my site is now going to start allowing two different types of users to sign up…
- normal people
- companies
the two will be able to do all the same things on the site, but their profiles will look different, and im sure they will want to store different types of information about themselves.
my question is: should i store them on separate mysql tables? or…should i put them on 1 and label them as ‘user’ or ‘company’?
I could really use your input to help me to avoid pitfalls with either…
thanks!
This link explains some best database practices.
I’d create an ‘Accounts’ table with a UID, with common information between the two stored there, and which type of account it is.
Then a ‘Companies’ table with company specific information, using the same UID as the account, and, I dunno, a ‘Users’ table with information specific to users.
This prevents you from having to make two very similar tables, having unused columns, or duplicating data.
Like this: