How to normalize a database where different user groups have different kinds of profiles?
- by Stephen
My application database has a Groups table that separates users into logical roles and defines access levels (admin, owner, salesperson, customer service, etc.)
Groups has many Users. The Users table contains login details such as username and password.
Now I wish to add user profiles to my database. The trouble I'm having (probably due to my relative unfamiliarity with proper database normalization) is that different user groups have different kinds of profiles. Ergo, a salesperson's profile will include his commission percentage, whereas an admin or customer service would not need this value.
So, would the proper method be to create a unique profile table for each group? (e.g. admin_profiles, or salesperson_profiles). or is there a better way that combines certain details in a generic profile, while some users have extended info. And if so, whats a good example of how to do this with the commission example given?