3

I have looked at previous questions dealing with New table or new column and When should I use a new table? and a few others. I'm a little confused, not sure if my problem has a different need/solution; so here goes:
I have a table for users with a userid, name, email, etc. This is used for both employees and for customers (at around 800 entries, it is split nearly 50-50).
I have a need to incorporate about 4-6 more columns for just the employees; such as manager, citizenship, office, etc. These would only be used for the employees and not for the customers.
My question is: do I create another table for the employees with those extra columns or do I add those columns to the 'users' table and default to NULL (for customers) in each one?
I thought this was a different situation than the other questions, which is why I posted it. If not, please let me know.
Thank you

1
  • At just 800 entries you could get either way in my opinion.
    – paparazzo
    Commented Jul 29, 2016 at 19:36

2 Answers 2

1

For proper normalization, I would split them up into two tables. It makes for a more logical design, and easier to maintain down the line if you want to make additional modifications.

1

If you follow a traditional entity relationship diagram customers and employees would typically be considered as two different entities and therefore would have thier own tables.

This would make sense to me in this case if a person could be both an employee and a customer at the same time. How would you handle that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.