Reference · ER diagram symbols

One to many symbol: how a 1 to many relationship is drawn in an ER diagram

In short

The one to many symbol is a line with a short bar at one end and a crow's foot, a three-pronged fork, at the other. The bar marks the "one" side and the crow's foot marks the "many" side, so the 1 to many relationship symbol between CUSTOMER and ORDER reads: one customer places many orders, and each order belongs to one customer. Chen notation shows the same relationship as a diamond with 1 and N on its two lines, and UML writes 1 and * at the two ends of a plain line.

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

What is the one to many symbol?

In crow's foot notation, the one that database tools draw, the one to many symbol is drawn on the line between two entity boxes. Each end of the line carries two marks. The mark nearest the box is the maximum: a bar for one, a crow's foot for many. The mark further from the box is the minimum: a bar for one, a circle for zero.

One to many symbol in crow's foot notation: two bars next to CUSTOMER, a circle and a crow's foot next to ORDER
One to many in crow's foot notation. The two bars next to CUSTOMER mean exactly one. The circle and crow's foot next to ORDER mean zero or many. Rendered with Mermaid 11.17.2 from the code below.
erDiagram
    direction LR
    CUSTOMER ||--o{ ORDER : places
MarkNameMeaningPosition
BarOneNearest the box it is a maximum of one. Further out it is a minimum of one.
Crow's footManyAlways nearest the box: a maximum of many.
CircleZeroAlways further out: a minimum of zero, so the relationship is optional.

The full set of four line ends is on the ER diagram cardinality symbols page.

How do you read a one to many symbol out loud?

Say two sentences, one in each direction. Start at one entity, follow the line, and read the marks at the far end. Then do the same from the other entity. The marks next to an entity always describe how many of that entity the other one can have.

DrawingSay it like this
One to many symbol in crow's foot notation: two bars next to CUSTOMER, a circle and a crow's foot next to ORDEREach customer places zero or many orders. Each order is placed by exactly one customer.
One to one-or-many: two bars next to ORDER, a bar and a crow's foot next to ORDER_LINEEach order contains one or many order lines. Each order line belongs to exactly one order.
Zero-or-one to zero-or-many: a circle and a bar next to TEACHER, a circle and a crow's foot next to CLUBEach teacher runs zero or many clubs. Each club is run by zero or one teacher.
Zero-or-one to one-or-many: a circle and a bar next to COACH, a bar and a crow's foot next to PLAYEREach coach trains one or many players. Each player is trained by zero or one coach.

All four are one to many relationships. They differ only in the minimum on each side: whether a customer may have no orders yet, and whether a club may exist without a teacher.

Which side of a one to many relationship gets the crow's foot?

The crow's foot goes next to the entity there are many of. To find it, ask the same question in both directions and compare the answers.

Can one A have many B?Can one B have many A?RelationshipWhere the crow's foot goes
YesNoOne to many (1:N)Next to B
NoYesMany to one (N:1), the same thing read from BNext to A
YesYesMany to many (M:N)At both ends, or better: add a third entity between them
NoNoOne to one (1:1)At neither end: a bar at both

Example: can one customer have many orders? Yes. Can one order have many customers? No. So the crow's foot goes next to ORDER, and ORDER is the table that will hold the foreign key.

How do you draw a one to many relationship step by step?

Take a school library. Members borrow books, and the library records every loan. The relationship between a member and that member's loans is one to many, and it takes three steps to draw.

Step 1

Draw the two entities

Write each thing the library stores data about as a box with a singular noun: MEMBER and LOAN. Give each one a primary key, marked PK. There is no line yet.

Step 1: two entity boxes, MEMBER and LOAN, with their attributes and no line between them
Two entities with their own attributes. Rendered with Mermaid 11.17.2 from the code below.
erDiagram
    direction LR
    MEMBER {
        int member_id PK
        string name
    }
    LOAN {
        int loan_id PK
        date due_date
    }

Step 2

Ask both questions and draw the line

Can one member have many loans? Yes, and a new member has none yet, so the LOAN end gets a circle and a crow's foot. Can one loan belong to many members? No, it belongs to exactly one, so the MEMBER end gets two bars. Write a verb on the line so it can be read as a sentence.

Step 2: a line from MEMBER to LOAN with two bars at MEMBER and a circle and crow's foot at LOAN
Each member takes out zero or many loans. Each loan is taken out by exactly one member. Rendered with Mermaid 11.17.2 from the code below.
erDiagram
    direction LR
    MEMBER ||--o{ LOAN : "takes out"
    MEMBER {
        int member_id PK
        string name
    }
    LOAN {
        int loan_id PK
        date due_date
    }

Step 3

Put the foreign key on the many side

Each loan has to remember which member it belongs to, so LOAN gets the column member_id, marked FK. The one side never gets the foreign key: a member row cannot hold a list of loans.

Step 3: the same line, and LOAN now holds the foreign key member_id
The finished one to many relationship with its foreign key. Rendered with Mermaid 11.17.2 from the code below.
erDiagram
    direction LR
    MEMBER ||--o{ LOAN : "takes out"
    MEMBER {
        int member_id PK
        string name
    }
    LOAN {
        int loan_id PK
        int member_id FK
        date due_date
    }

Draw this in the editor → Opens ChartCraft with this description filled in: “ER diagram for a library: a member takes out zero or many loans, each loan belongs to exactly one member. Member has member_id and name. Loan has loan_id, member_id and due_date.”

How is one to many written in Chen, UML and other notations?

Every ER notation can show one to many, each with its own marks. Check which notation your course or textbook uses before you draw, because mixing two of them on one line is marked as an error.

NotationDrawingHow one to many is shownWhere you meet it
Crow's footA bar at the one end, a crow's foot at the many endDatabase tools, most ER diagrams drawn today
ChenA diamond for the relationship, with 1 and N written on the linesDatabase textbooks and exams
(min,max)A pair next to each entity says how many times it takes part: a member 0 to N times, a loan exactly onceTextbooks that extend Chen notation
UMLMultiplicities at the line ends: 1 and 0..*, where * alone also means 0..*Class diagrams, software design courses
IDEF1XA dot at the child (many) end. A plain dot means zero, one or many, P means one or moreModels that follow the IDEF1X standard, FIPS PUB 184

Watch the (min,max) row: the pair sits next to the entity it describes, so (0,N) is written at the MEMBER end although N is the many side. In crow's foot, Chen and UML the many mark sits at the LOAN end. The drawings in this table are made by hand, because Mermaid draws crow's foot only.

The same one to many relationship as a UML association with multiplicities 1 and 0..*
The UML form, drawn by Mermaid as a class diagram association. Rendered with Mermaid 11.17.2 from the code below.
classDiagram
    direction LR
    class Customer
    class Order
    Customer "1" -- "0..*" Order : places

A full comparison is on Chen vs crow's foot notation.

Which one to many mistakes lose marks?

Four mistakes account for most lost marks on one to many questions. Each is shown with the wrong drawing and the corrected one.

1. The crow's foot is at the wrong end

Loses marks

Wrong: the crow's foot is drawn next to MEMBER, which says one loan belongs to many members

MEMBER }o--|| LOAN : "takes out"

Correct

Right: the crow's foot is next to LOAN, the entity there are many of

MEMBER ||--o{ LOAN : "takes out"

The wrong drawing says that each loan is taken out by many members and each member has exactly one loan. The crow's foot belongs next to the entity there are many of, which is LOAN.

2. The foreign key is on the one side

Loses marks

Wrong: the foreign key loan_id sits in MEMBER, the one side

Correct

Step 3: the same line, and LOAN now holds the foreign key member_id

A member with three loans would need three values in one loan_id column. The foreign key always goes in the table at the crow's foot end, so that each loan row stores one member_id.

3. A many to many relationship is drawn as one to many

Loses marks

Wrong: books and authors drawn as one to many, although an author can write many books

BOOK ||--o{ AUTHOR : "written by"

Correct

Right: BOOK and AUTHOR joined through AUTHORSHIP by two one to many lines

A book can have several authors and an author can write several books, so both answers are yes and the relationship is many to many. Split it with a third entity. The result is two one to many relationships, each with its crow's foot at the new entity.

4. Two notations are mixed on one line

Loses marks

A Chen diamond with N and a crow's foot on the same line

Correct

Chen only: diamond, 1 and N

Pick one notation for the whole diagram. A diamond with 1 and N is Chen. Bars, circles and crow's feet on a plain line are crow's foot. Using both on one line says the same thing twice and often says it inconsistently.

How do you write a one to many relationship in Mermaid?

Write the two entity names with the mark pair between them and a label after a colon: CUSTOMER ||--o{ ORDER : places. The left pair || means exactly one, the right pair o{ means zero or many, and the two hyphens draw a solid line.

MermaidLeft endRight endUse it when
A ||--o{ B : hasExactly oneZero or manyA child row is optional: a customer with no orders yet
A ||--|{ B : hasExactly oneOne or manyAt least one child must exist: an order with at least one line
A |o--o{ B : hasZero or oneZero or manyThe parent is optional too: a club that has no teacher yet
A }o--|| B : hasZero or manyExactly oneThe same relationship written from the many side (many to one)

Mermaid also accepts words in place of the marks, for example CUSTOMER only one to zero or more ORDER : places. A dashed line, written with two dots as in CUSTOMER ||..o{ ORDER : places, marks a non-identifying relationship. Paste any line into the Mermaid syntax checker to see it drawn.

Can you answer these five one to many questions?

Try each question before you open the answer. They follow the order of the page: find the many side, read the line, place the key, spot a many to many, and tell the two minimums apart.

Question 1. A school has many pupils, and each pupil attends one school. Which end of the line gets the crow's foot?

Worked answer

Ask both questions. Can one school have many pupils? Yes. Can one pupil attend many schools? No.

The answers are yes and no, so this is one to many and the crow's foot goes next to PUPIL. SCHOOL gets a bar.

Question 2. Read this line out loud: DEPARTMENT ||--o{ EMPLOYEE : employs

Worked answer

Read the marks at the far end each time. From DEPARTMENT, the far end shows a circle and a crow's foot: zero or many. From EMPLOYEE, the far end shows two bars: exactly one.

Each department employs zero or many employees. Each employee is employed by exactly one department.

Question 3. In AUTHOR ||--o{ BOOK : writes, which table gets the foreign key, and what is it called?

Worked answer

The foreign key goes in the table at the crow's foot end, the many side. That is BOOK.

It holds the primary key of the one side, so the column is author_id, and every book row stores the one author it belongs to.

Question 4. A student takes many courses and a course has many students. Is STUDENT to COURSE a one to many relationship?

Worked answer

No. Both questions get the answer yes, so it is many to many.

Add an entity between them, for example ENROLMENT. Then STUDENT to ENROLMENT is one to many and COURSE to ENROLMENT is one to many, with both crow's feet at ENROLMENT.

Question 5. What changes in the meaning when ORDER ||--o{ ORDER_LINE becomes ORDER ||--|{ ORDER_LINE?

Worked answer

Only the minimum at the ORDER_LINE end changes, from a circle (zero) to a bar (one).

The first says an order may have no lines. The second says every order has at least one order line. Both are one to many.

What do one to many relationships look like in complete diagrams?

Diagrams from the public ChartCraft gallery, each generated from a plain-English description. Open one to see the prompt that produced it, or see more on crow's foot ER diagram examples.

Questions

What is the one to many symbol?

In crow's foot notation it is a line with a bar at the one end and a crow's foot, a three-pronged fork, at the many end. In Chen notation it is a diamond with 1 and N written on its two lines.

What is the 1 to many symbol in an ER diagram?

The crow's foot. It is drawn at the end of the relationship line next to the entity there are many of, while the other end carries a bar for one. Tools write it as 1:N or 1:M.

What is the 1 to many relationship symbol in Chen notation?

A diamond between the two entity rectangles, with 1 written on the line to one entity and N written on the line to the other. Chen's 1976 paper says the mapping is shown by specifying 1, m and n in the diagram.

Which side of a one to many relationship gets the crow's foot?

The many side: the entity that can occur many times for one instance of the other. It is also the table that holds the foreign key.

How do you show one to many in an ERD diagram?

Draw a line between the two entities, put two bars next to the one side and a circle or bar plus a crow's foot next to the many side, and label the line with a verb. In Mermaid this is CUSTOMER ||--o{ ORDER : places.

Where does the foreign key go in a one to many relationship?

In the table on the many side, the end with the crow's foot. Each row there stores the primary key of the one row it belongs to.

What does a circle next to the crow's foot mean?

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

Is one to many the same as many to one?

Yes, it is the same relationship read from the other entity. Customer to order is one to many, and order to customer is many to 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 →