Reference · ER diagram symbols

ER diagram cardinality symbols: what each line end means

In short

ERD cardinality symbols are the marks at each end of a relationship line. In crow's foot notation there are four: two bars mean exactly one, a circle and a bar mean zero or one, a bar and a crow's foot mean one or many, and a circle and a crow's foot mean zero or many. Every end is made of two marks: the one nearest the entity box is the maximum, the one further out is the minimum. Chen notation writes 1, N and M on the lines instead, and UML writes multiplicities such as 1 and 0..*.

Updated · by the ChartCraft team · drawings rendered with Mermaid 11.17.2 · part of the ER diagram symbols reference

What are the cardinality symbols in an ER diagram?

There are four cardinality symbols in crow's foot notation, and each is a pair of marks at the end of a relationship line. Learn the three marks first (bar, circle, crow's foot), then the four pairs they make.

SymbolNameMinimumMaximumMermaidExample from a school timetable
Exactly one11||LESSON }o--|| ROOM : "takes place in": each lesson takes place in exactly one room
Zero or one01o| or |oTEACHER ||--o| FORM_GROUP : tutors: a teacher tutors at most one form group, and may tutor none
One or many1Many|{ or }|FORM_GROUP ||--|{ LESSON : attends: every form group attends at least one lesson
Zero or many0Manyo{ or }oTEACHER ||--o{ LESSON : teaches: a new teacher may have no lessons yet

Mermaid writes the pair the way it is drawn on that side of the line, so the zero or many end is o{ on the right of the two hyphens and }o on the left. Both mean the same thing.

School timetable ER diagram that uses all four crow's foot cardinality symbols between TEACHER, ROOM, FORM_GROUP and LESSON
A school timetable that uses all four cardinality symbols. Rendered with Mermaid 11.17.2 from the code below.
erDiagram
    TEACHER ||--o{ LESSON : teaches
    ROOM ||--o{ LESSON : hosts
    FORM_GROUP ||--|{ LESSON : attends
    TEACHER ||--o| FORM_GROUP : tutors

How do you tell the minimum from the maximum?

The mark nearest the entity box is the maximum and the mark further from the box is the minimum. A circle can only be a minimum (zero), a crow's foot can only be a maximum (many), and a bar can be either, which is why exactly one has two bars.

MarkAs the inner mark (maximum)As the outer mark (minimum)
At most oneAt least one: the relationship is mandatory
Never used hereZero: the relationship is optional
ManyNever used here

Some textbooks call the maximum the cardinality and the minimum the modality or ordinality. The marks are the same whichever word your course uses.

How do you read cardinality symbols out loud?

Start at one entity, go along the line, and read the two marks at the far end as "zero or one", "exactly one", "one or many" or "zero or many". Then go back the other way. Every line gives two sentences.

DrawingSay it like this
Exactly one: two bars at the ROOM end of the line from LESSONEach lesson takes place in exactly one room. Each room hosts zero or many lessons.
Zero or one: a circle and a bar at the FORM_GROUP end of the line from TEACHEREach teacher tutors zero or one form group. Each form group is tutored by exactly one teacher.
One or many: a bar and a crow's foot at the LESSON end of the line from FORM_GROUPEach form group attends one or many lessons. Each lesson is attended by exactly one form group.
Zero or many: a circle and a crow's foot at the LESSON end of the line from TEACHEREach teacher teaches zero or many lessons. Each lesson is taught by exactly one teacher.

How do you choose the right cardinality, step by step?

Ask four questions for every line: the minimum and maximum in one direction, then the minimum and maximum in the other. Here is the school timetable worked through in three steps.

Step 1

Ask the maximum questions

Can a teacher teach many lessons? Yes. Can a lesson have many teachers? In this school, no. So the LESSON end gets a crow's foot and the TEACHER end gets a bar as its inner mark.

Step 2

Ask the minimum questions

Can a teacher exist with no lessons, for example a teacher who has just joined? Yes, so the LESSON end gets a circle. Can a lesson exist with no teacher? No, so the TEACHER end gets a second bar.

Zero or many: a circle and a crow's foot at the LESSON end of the line from TEACHER
Each teacher teaches zero or many lessons. Each lesson is taught by exactly one teacher. Rendered with Mermaid 11.17.2 from the code below.
erDiagram
    direction LR
    TEACHER ||--o{ LESSON : teaches

Step 3

Repeat for every line

Do the same for ROOM, FORM_GROUP and the tutor relationship. A form group always has lessons (one or many), and a teacher tutors at most one group and may tutor none (zero or one).

School timetable ER diagram that uses all four crow's foot cardinality symbols between TEACHER, ROOM, FORM_GROUP and LESSON
The finished timetable model. Rendered with Mermaid 11.17.2 from the code below.
erDiagram
    TEACHER ||--o{ LESSON : teaches
    ROOM ||--o{ LESSON : hosts
    FORM_GROUP ||--|{ LESSON : attends
    TEACHER ||--o| FORM_GROUP : tutors

Draw this in the editor → Opens ChartCraft with this description filled in: “ER diagram for a school timetable: a teacher teaches zero or many lessons, a room hosts zero or many lessons, a form group attends one or many lessons, and a teacher tutors zero or one form group.”

How is cardinality written in Chen, UML and (min,max) notation?

The meaning is the same in every notation; only the marks change. Chen writes the maximum as 1, N or M on the lines into the diamond. UML writes lower..upper at each end. The (min,max) style writes a pair next to each entity.

Meaning at the B endCrow's footChenUML(min,max) at A
Exactly one1 (with a double line for total participation)1(1,1)
Zero or one10..1(0,1)
One or manyN (with a double line for total participation)1..*(1,N)
Zero or manyN0..* or *(0,N)

Chen's 1976 paper shows only the maximum (1, m, n). Minimums in Chen diagrams come from later textbook extensions, most often a double line for total participation or a (min,max) pair, so check which one your course uses. The (min,max) pair is written next to the entity it counts, which puts it at the opposite end from the crow's foot mark with the same meaning.

UML multiplicities 1 and 0..* on an association between Teacher and Lesson
The UML form: multiplicities 1 and 0..* on an association. Rendered with Mermaid 11.17.2 from the code below.
classDiagram
    direction LR
    class Teacher
    class Lesson
    Teacher "1" -- "0..*" Lesson : teaches

Which cardinality mistakes lose marks?

Most marks are lost on minimums, not maximums. Students usually get the crow's foot in the right place and then put a bar where the scenario needs a circle.

1. A mandatory minimum where the scenario allows zero

Loses marks

Wrong for a shop where a customer may have no orders: a bar and a crow's foot at ORDER means at least one order

CUSTOMER ||--|{ ORDER : places

Correct

One to many symbol in crow's foot notation: two bars next to CUSTOMER, a circle and a crow's foot next to ORDER

CUSTOMER ||--o{ ORDER : places

A bar and a crow's foot at ORDER say every customer has at least one order, so a customer could not register before buying. Read the question for words like may, can or not yet: they mean a circle.

2. The marks are read from the wrong side

Loses marks

Crow's foot next to TEACHER

Correct

Crow's foot next to LESSON

The marks next to LESSON answer: how many lessons does one teacher have? Writing the answer next to the entity you started from swaps the meaning.

3. Inner and outer marks are swapped

Loses marks

Circle next to the box, crow's foot outside

Correct

Crow's foot next to the box, circle outside

The crow's foot is a maximum and always touches the box. A circle next to the box would mean a maximum of zero, which is not a relationship at all.

Is there a printable ER cardinality cheat sheet?

Yes. The sheet below has the four line ends, the three marks, and the same cardinality in Chen, UML, (min,max) and IDEF1X on one page.

ER diagram cardinality symbols cheat sheet: the four crow's foot line ends, the three marks, and Chen, UML, (min,max) and IDEF1X forms
One page, free to print and share.

Can you answer these five cardinality questions?

Each question uses one rule from this page. Try it before you open the worked answer.

Question 1. Which mark can only be a minimum, and which can only be a maximum?

Worked answer

The circle is only ever a minimum (zero), so it is always the outer mark. The crow's foot is only ever a maximum (many), so it always touches the box.

The bar can be either, which is why exactly one is drawn with two bars.

Question 2. What does PASSPORT |o--|| PERSON : identifies say?

Worked answer

From PASSPORT, the far end shows two bars: each passport identifies exactly one person.

From PERSON, the far end shows a circle and a bar: each person has zero or one passport.

Question 3. A hospital ward always has at least one bed and can have many. Which symbol goes at the BED end?

Worked answer

Minimum one, maximum many: one or many, a bar and a crow's foot. In Mermaid: WARD ||--|{ BED : contains.

Question 4. Write zero or many in UML and in a (min,max) pair.

Worked answer

UML writes 0..*, or just *, at the many end (UML 2.5.1 clause 7.5.4).

The (min,max) pair is (0,N), written next to the entity that takes part zero to N times.

Question 5. A student says "a circle means many". Where does that confusion come from, and what is right?

Worked answer

The circle sits right next to the crow's foot in the common zero or many end, so it gets read as part of the many mark.

The circle means zero. It sets the minimum. The crow's foot alone means many.

Questions

What are the ERD cardinality symbols?

In crow's foot notation there are four: two bars (exactly one), a circle and a bar (zero or one), a bar and a crow's foot (one or many), and a circle and a crow's foot (zero or many).

What are the cardinality symbols in an ER diagram?

They are the marks at each end of a relationship line that say how many instances of the entity at that end can relate to one instance of the entity at the other end.

In an ERD, how is cardinality represented at the ends of connectors?

Using symbols such as a bar, a circle and a crow's foot. The mark nearest the entity is the maximum and the mark further out is the minimum.

What does a circle mean in an ER diagram?

Zero. It is the minimum, so the relationship is optional on that side. A circle and a crow's foot together mean zero or many.

What does a double bar mean in an ERD?

Exactly one: a minimum of one and a maximum of one. It is also called one and only one, or mandatory one.

How is cardinality shown in Chen notation?

By writing 1, N or M on the lines between the entity rectangles and the relationship diamond. Textbooks add a double line or a (min,max) pair to show the minimum.

What is the difference between cardinality and modality?

Cardinality is the maximum number of related instances (one or many). Modality, also called ordinality or optionality, is the minimum (zero or one).

Sources

The rules and names on this page were checked against these documents.

Related references

Describe the entities in plain English. ChartCraft puts the right marks on every line.

ER diagram generator →