dream8877 2013-02-12 08:22
浏览 16
已采纳

为每个注册用户制作一张桌子(是否实用?)

I'm working on a authentication system for my C# apps, the authentication system is in PHP. It has users and it works perfectly right now for one person, such as myself. I can add my own customers, set their permissions, update my program, and do much more.

But...

I want it to work so that I can have users sign up with a developer account from which they can control their own customers. But the problem is, with just my account I already have three tables. (customers, files, and global)

So should I make a whole new table for every customer? Or should I just shove them all in one huge table, with a column stating the ID of their parent developer.

I really hope this was clear enough...

If you're still confused here's some pics which may help (This is the three tables I need for just my developer account)



(Don't worry these are not my actual users passwords... I'm still working on the website, it's all example stuff now)

  • 写回答

2条回答 默认 最新

  • dongpa5277 2013-02-12 08:25
    关注

    You should put them all in one table with an ID linking them to the parent / any other information you need to store.

    You could even have a customer type column as well if you need to differentiate.

    Either way, having a new table for each user is not the right way.

    EDIT: If you are worried about the size of the table then don't be. As long as you implement correct indexing then accessing this information won't be a problem. MySQL can handle millions of records in a table.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 yolov8边框坐标
  • ¥15 matlab中使用gurobi时报错
  • ¥15 WPF 大屏看板表格背景图片设置
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真