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

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)

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.

"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."

So, you have a one to many relationship.

A table of users...

And a table of customers, who have a foreign key referencing user.

That's two tables. If you think you need to make new tables for every user, or any similar idea like that, you are almost certainly wrong.