emkay — 2011-06-17T10:46:26-04:00 — #1
I'm working on a new project and it will have several different user types. However, each different user type will require different information to be stored about each record in the database.
Do I make individual tables for each user type or store them all in the same table anyway?
r937 — 2011-06-17T13:23:30-04:00 — #2
yes to both!
search for supertype/subtype and come back if you're still not sure ...
linuxfreelancer — 2011-06-17T17:20:41-04:00 — #3
It depends on how much data being stored differs based on their user type. I coded a social network that allows the choosing of a "account type" like facebook. So the profiles for the users is totally different based on their account type, so i created a table for each type. profile_bands, profile_personal, profile_business etc.
The purpose is to keep the table as lite as possible and make it easy to setup INDEXes for faster queries.