Example
I have Person
, SpecialPerson
, and User
. Person
and SpecialPerson
are just people - they don't have a user name or password on a site, but they are stored in a database for record keeping. User has all of the same data as Person
and potentially SpecialPerson
, along with a user name and password as they are registered with the site.
How would you address this problem? Would you have a Person
table which stores all data common to a person and use a key to look up their data in SpecialPerson
(if they are a special person) and User (if they are a user) and vice-versa?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…