Reputation: 77
I'm sorry for the rather stupid question. For example, can one table have composite primary key consisting of 'user_id' and 'employee_id'
and another table containing 'user_id' as primary key?
Upvotes: 2
Views: 1487
Reputation: 48177
Short Answer: YES, in that case you have one-to-0/1 relationship
For example table USERS
have PK user_id
Then table SUPERUSERS
have also PK user_id
and is also FK
to users
. Not all users are superusers, and you need define some attributes/roles/privilege to superusers.
Upvotes: 4