Reputation: 73
Can a relationship in an entity relationship diagram have a key attribute of its own? If not, then do we have to make a separate entity with this key ?
Upvotes: 4
Views: 13875
Reputation: 14388
The only kind of relationship which would have its own key would be a many-to-many relationship. The key of this relationship is naturally the combination of the foreign keys to each of its parents.
If there are other attributes of the relationship then it isn't a relationship at all, it's an entity in its own right.
The keys associated with one-to-many (and one-to-one) relationships reside in the child table as foreign keys.
Upvotes: 5