Can a relation between entities have a key in an ER diagram?
Doing my assignment I added a primary key to a relation between two entities but the instructor didn't agree.
Can a relation between entities have a key in an ER diagram?
Doing my assignment I added a primary key to a relation between two entities but the instructor didn't agree.
Copyright © 2021 Jogjafile Inc.
Entities have a unique identity and have a primary key that uniquely identifies them. For an authoritative definition, see Chen's foundational paper of ER theory:
Relationships are only defined by the entities they relate. They do not have an identity on their own, as they do not exist on their own. Hence, they should not have a key on their own:
There is however an exception: the associative entity is at the same time a relationship and an entity. As it is an entity, it should have its own primary key. And as it's also a relationship, it's a relationship with its own primary key.