How to normalize a database where different user groups have different kinds of profiles?

Posted by Stephen on Stack Overflow See other posts from Stack Overflow or by Stephen
Published on 2010-06-14T15:04:19Z Indexed on 2010/06/14 15:12 UTC
Read the original article Hit count: 178

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?

© Stack Overflow or respective owner

Related posts about database

Related posts about database-design