How to show composite keys in Chen E-R Diagram

erd
NoChance picture NoChance · Apr 14, 2017 · Viewed 13.7k times · Source

How to show composite keys in Chen E-R Diagram? I have not used this notation and I really don't like it. Any references would suffice, as I have excellent understanding of data modeling concepts (what a brag!). Note: I am aware of the symbol for associative entity, in such a symbol, one may have an auto-increment key as the PK, but then again, one may use the 2 FKs. In the later case, the PK would be composite. I don't know how to show it since Chen attribute symbol is an oval for each attribute. Thanks.

Answer

reaanb picture reaanb · Apr 14, 2017

You can underline the text of each attribute that is involved in the primary key:

Composite primary key in ERD

Note that an associative entity set normally has a composite key. Introducing a surrogate key changes it into a regular entity set with its own identity. Associative entity sets are really just relationships which are the subjects of further relationships, and relationships are identified by the entity keys of the related entity sets.