Database systems · Chapter 2 · Data models
Four small marks at the end of a line. Each one answers two questions at once, and once you can see which is which, an ERD reads like a sentence.
Three components, and only three. Everything else on the diagram is one of these.
Attributes can be listed inside the rectangle, as in the schema drawings you have already seen, or left off entirely when the point of the diagram is the relationships. Chapter 2 shows both.
The verb phrase is written once but reads in two directions. That is not a shortcut. It is the reason the symbols at the two ends can differ.
This is the whole idea. A single end symbol is really two symbols side by side, answering two different questions about the entity it touches.
One, or many. Drawn touching the entity box: a bar for one, a crow’s foot for many. This is what fixes the relationship’s connectivity as 1:1, 1:M or M:N.
Zero, or one. Drawn just behind the maximum: a circle for zero, a bar for one. This is what makes participation optional or mandatory.
Position is what tells them apart. The symbol nearest the entity is always the maximum; the one set back from it is always the minimum. On this page the maximum is drawn in indigo and the minimum in crimson, but in a real ERD both are plain black and you have to read the order.
A circle therefore never means “many.” It only ever means zero, and it only ever appears in the outer position. If you see a circle touching a box, the diagram is drawn wrong.
Two choices for the maximum, two for the minimum. That is all four symbols, and there are no others.
Some diagrams add the numeric pair in parentheses next to the entity, such as (1,1) or (0,M), either instead of the symbols or alongside them. The pair is always minimum first, maximum second, which is the same order as the symbols read from the outside in. When a business rule fixes a real limit, such as a class holding no more than 35 students, that number goes in the maximum position: (0,35).
Change either end and watch the sentences change with it. The connectivity label comes only from the two maximums.
Notice which sentence each end controls. The symbol beside INVOICE tells you how many invoices one customer has. It describes the entity it touches. Students reliably get this backwards on a first reading.
Ignore the circles and bars in the outer position and look only at what touches the boxes. Bar and bar is 1:1. Bar and crow’s foot is 1:M. Two crow’s feet is M:N.
Chapter 2 stresses that a many to many relationship cannot be implemented directly in a relational database. When you draw crow’s feet at both ends you have described the business accurately, but you have not yet produced something you can build. The fix is a bridge entity between them, which turns one M:N into two 1:M relationships. That is exactly what the invoice line entity does in a sales model.
Minimums never change the connectivity. Making a side optional changes whether a row is required, not how many rows are permitted, and it has no effect on how the tables are structured.
Crow’s Foot is one of three notations Chapter 2 puts side by side. They express the same connectivity in different marks.
| Type | Chen | Crow’s Foot | UML class diagram |
|---|---|---|---|
| 1:1 | 1 and 1 beside a diamond | Bar at both ends | 1..1 at both ends |
| 1:M | 1 and M beside a diamond | Bar at one end, crow’s foot at the other | 1..1 and 1..* |
| M:N | M and N beside a diamond | Crow’s foot at both ends | *..* on both ends |
Chen notation draws the relationship as a labelled diamond between the entity rectangles and writes the connectivity as letters along the connecting lines. It is explicit and reads clearly, but it consumes a great deal of space once a diagram has more than a handful of entities.
UML class diagram notation writes multiplicity as a numeric range at each end, which is closer to Crow’s Foot in spirit. It also carries the minimum and maximum together, just as digits rather than marks.
Crow’s Foot has become the common choice in practice because the symbols sit on the line itself. No diamonds, no extra shapes, and the diagram stays legible when it grows to thirty entities. That compactness is why the modelling tools you will use in this course default to it.