Possible Duplicate:
Would it be considered as a bad practice to have multiple nullable FKs on a table in SQL Server
I have two tables, Users and People, both of which share a common attribute, email address, of which they should be allowed to have many email addresses. A User has many People, a Person belongs to a User.
I can see three options myself:
One link table with redundant columns:
- Users [id,email_id] and People [id,email_id]
- EmailAddress [user_id,person_id,email_id]
- Emails [id,address,type]
Two link tables without redundancies:
- Users [id,email_id] and People [id,email_id]
- PersonEmail [person_id,email_id]
- UserEmail [user_id,email_id]
- Emails [id,address,type]
No link tables with redundant columns:
- Users [id] and People [id]
- Emails [id,address,type,user_id,person_id]
Does anyone have any idea what would be the best option, or if there is any other ways?
UPDATE: I figured that it may be a good idea to use inheritance. In the system, the User is conceptually different as they have permission to login and use the system and they retain information on people, much like having their own address book. Yes, the users and people will share many attributes, over name, email, phone, address, etc.