I have an architecture problem about how to store data related to a specific role in a relational database.
I have three roles, a Subscriber Contact
, Teacher
, and Student
. They are all stored in the Users
table, but have specific properties related to each. A student has a SchoolId
, Grade
, a subscriber contact has a DistrictId
, a teacher has ProgramId
, SchoolId
, Grade
.
Should I have three separate tables for subscriber contact, teacher, and student, or should I do some kind of key/value lookup? If key/value lookup how can I do this and how can I do it for a foreign key, like DistrictId
and SchoolId
?