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.
erDiagram
direction LR
CUSTOMER ||--o{ ORDER : places| Mark | Name | Meaning | Position |
|---|---|---|---|
| Bar | One | Nearest the box it is a maximum of one. Further out it is a minimum of one. | |
| Crow's foot | Many | Always nearest the box: a maximum of many. | |
| Circle | Zero | Always 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.
| Drawing | Say it like this |
|---|---|
| Each customer places zero or many orders. Each order is placed by exactly one customer. | |
| Each order contains one or many order lines. Each order line belongs to exactly one order. | |
| Each teacher runs zero or many clubs. Each club is run by zero or one teacher. | |
| Each 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? | Relationship | Where the crow's foot goes |
|---|---|---|---|
| Yes | No | One to many (1:N) | Next to B |
| No | Yes | Many to one (N:1), the same thing read from B | Next to A |
| Yes | Yes | Many to many (M:N) | At both ends, or better: add a third entity between them |
| No | No | One 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.
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.
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.
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.
| Notation | Drawing | How one to many is shown | Where you meet it |
|---|---|---|---|
| Crow's foot | A bar at the one end, a crow's foot at the many end | Database tools, most ER diagrams drawn today | |
| Chen | A diamond for the relationship, with 1 and N written on the lines | Database 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 once | Textbooks that extend Chen notation | |
| UML | Multiplicities at the line ends: 1 and 0..*, where * alone also means 0..* | Class diagrams, software design courses | |
| IDEF1X | A dot at the child (many) end. A plain dot means zero, one or many, P means one or more | Models 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.
classDiagram
direction LR
class Customer
class Order
Customer "1" -- "0..*" Order : placesA 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
MEMBER }o--|| LOAN : "takes out"
Correct
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
Correct
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
BOOK ||--o{ AUTHOR : "written by"
Correct
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.
| Mermaid | Left end | Right end | Use it when |
|---|---|---|---|
A ||--o{ B : has | Exactly one | Zero or many | A child row is optional: a customer with no orders yet |
A ||--|{ B : has | Exactly one | One or many | At least one child must exist: an order with at least one line |
A |o--o{ B : has | Zero or one | Zero or many | The parent is optional too: a club that has no teacher yet |
A }o--|| B : has | Zero or many | Exactly one | The 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.
- Mermaid documentation, Entity Relationship Diagrams. The four mark pairs (|o, ||, }o, }|), the word aliases, identifying (--) and non-identifying (..) lines, and the PK, FK and UK keys.
- A Practical Introduction to Databases, chapter 2.4, ERD alternatives and variations. Open textbook on Runestone Academy. Source for the reading rule of crow's foot marks (the symbol closest to the entity is the maximum, the one further away the minimum) and for the (min,max) and 0..N alternatives.
- Peter Pin-Shan Chen, The Entity-Relationship Model: Toward a Unified View of Data (1976). The MIT Sloan working paper of the article published in ACM Transactions on Database Systems 1(1). Section 3.1: entity sets as rectangular boxes, relationship sets as diamond-shaped boxes, and 1, m and n written in the diagram.
- OMG Unified Modeling Language, version 2.5.1. Clause 7.5.4 for multiplicity strings (lower..upper, * for an unlimited upper bound, * alone for 0..*) and clause 11.5.4 for association notation.
- FIPS PUB 184, Integration Definition for Information Modeling (IDEF1X). Clause 3.5.2: a line with a dot at the child end, P for one or more, Z for zero or one, a solid line for an identifying and a dashed line for a non-identifying relationship.