The Entity Relationship Diagram
We can express the overall logical structure of a database graphically with an E-R diagram.
Its components are:
- rectangles representing entity sets.
- ellipses representing attributes.
- diamonds representing relationship sets.
- lines linking attributes to entity sets and entity sets to relationship sets.
In the text, lines may be directed (have an arrow on the end) to signify mapping cardinalities for relationship sets. Figures 2 to 4 show some examples.
Go back and review mapping cardinalities. They express the number of entities to which an entity can be associated via a relationship.
The arrow positioning is simple once you get it straight in your mind, so do some examples. Think of the arrow head as pointing to the entity that “one” refers to.