Reference · ER diagram symbols

ER diagram relationship symbols: lines, diamonds and what the arrows mean

In short

In an ER diagram a relationship is drawn as a line between two entities in crow's foot notation and as a diamond joined to the entities by lines in Chen notation. The line is labelled with a verb, carries cardinality marks at its ends, and is solid for an identifying relationship or dashed for a non-identifying one. A double diamond in Chen marks the identifying relationship of a weak entity. ER diagrams have no arrows of their own: an arrow on a line comes from UML or from older data structure diagrams.

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

What are the relationship symbols in an ER diagram?

Seven symbols cover every relationship you meet in a course: the plain line, the dashed line, the Chen diamond, the double diamond, the double line for total participation, the recursive loop and the associative entity.

SymbolNameNotationMeaning
Solid lineCrow's footA relationship. Solid means identifying: the child's key includes the parent's key.
Dashed lineCrow's foot, IDEF1XA non-identifying relationship: the child has its own key.
DiamondChenA relationship set, named with a verb, joined by lines to the entities that take part.
Double diamondChenThe identifying relationship of a weak entity.
Double lineChenTotal participation: every instance of that entity takes part.
Recursive lineAllA relationship between instances of the same entity, such as an employee managing employees.
Three-way diamondChenA ternary relationship among three entities.

The marks at the ends of a line (bar, circle, crow's foot) are cardinality symbols. They have their own page: ER diagram cardinality symbols.

What do the solid and dashed line symbols mean?

Both are relationships. The difference is in the keys. On a solid line the child's primary key contains the parent's key, so the child cannot be identified without the parent. On a dashed line the child has its own key and the parent's key is only a foreign key.

DrawingSay it like this
A weak entity in crow's foot notation: ROOM takes BUILDING's key into its own primary key and the line is solidA room is identified by its building and its number. The line is solid: identifying.
A dashed relationship line between CUSTOMER and ORDER: a non-identifying relationshipAn order has its own order number and only refers to its customer. The line is dashed: non-identifying.

Mermaid draws a solid line with two hyphens (--) and a dashed line with two dots (..). Many tools and textbooks draw every relationship solid and ignore the difference, so follow your course.

How are recursive and many to many relationships drawn?

A recursive relationship is a line that starts and ends at the same entity. A many to many relationship has a crow's foot at both ends; in a logical model you replace it with an associative entity that holds the attributes of the pair.

DrawingSay it like this
A recursive relationship: a line that leaves EMPLOYEE and returns to EMPLOYEE, labelled managesEach employee manages zero or many employees. Each employee is managed by zero or one employee.
Many to many: a crow's foot at both ends of the line between STUDENT and COURSEEach student takes zero or many courses. Each course is taken by zero or many students.
The many to many relationship resolved: ENROLMENT sits between STUDENT and COURSE and holds the gradeEach student has zero or many enrolments, each course has zero or many enrolments, and each enrolment links one student to one course.

What do arrows mean in an ER diagram?

Crow's foot and Chen notation do not use arrowheads on relationship lines. If you see an arrow on an ERD, it comes from one of three places, and each means something different.

Where the arrow comes fromWhat it means
UML class diagramNavigability: the class at the tail can reach the class at the head. It says nothing about how many.
Chen 1976, weak entitiesChen's paper draws an arrow toward the weak entity DEPENDENT to show that it depends on EMPLOYEE for its identity.
Data structure (Bachman) diagramsAn arrow from the one record type to the many record type. Chen's paper discusses these arrows as a weaker form of 1:n relationship.
A UML association with an open arrowhead pointing from Order to Customer
A UML association with an arrowhead: navigability, not cardinality. Rendered with Mermaid 11.17.2 from the code below.
classDiagram
    direction LR
    class Order
    class Customer
    Order --> Customer : placedBy

If a question asks for an ER diagram in crow's foot or Chen notation, do not add arrowheads. Show direction by the verb you write on the line instead.

How do you draw the relationships of a university model?

Take a university: students, courses, departments and staff. Draw it in three steps, one kind of relationship at a time.

Step 1

Find the verbs

Underline the verbs in the scenario: a student takes courses, a department offers courses, an employee manages employees. Each verb is one relationship, and its subject and object are the entities.

Step 2

Resolve the many to many

Takes is many to many, and the grade belongs to the pair, not to the student or the course. Replace the line with an ENROLMENT entity.

The many to many relationship resolved: ENROLMENT sits between STUDENT and COURSE and holds the grade
STUDENT and COURSE joined through ENROLMENT. Rendered with Mermaid 11.17.2 from the code below.
erDiagram
    direction LR
    STUDENT ||--o{ ENROLMENT : has
    ENROLMENT }o--|| COURSE : "is for"
    ENROLMENT {
        date enrolled_on
        string grade
    }

Step 3

Add the recursive line

Manages joins EMPLOYEE to itself. The managed-by end is zero or one, because the head of the university has no manager.

A recursive relationship: a line that leaves EMPLOYEE and returns to EMPLOYEE, labelled manages
The recursive manages relationship. Rendered with Mermaid 11.17.2 from the code below.
erDiagram
    EMPLOYEE |o--o{ EMPLOYEE : manages

Draw this in the editor → Opens ChartCraft with this description filled in: “ER diagram for a university: students and courses are many to many through an enrolment entity holding the grade, a department has one or many courses, and an employee manages zero or many employees.”

Which relationship mistakes lose marks?

Three mistakes are about the relationship symbol itself, not the cardinality at its ends.

1. An arrow drawn on a crow's foot line

Loses marks

A UML association with an open arrowhead pointing from Order to Customer

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

An arrowhead is UML navigability. In crow's foot notation the direction is carried by the verb and the cardinality by the marks.

2. No verb on the line

Loses marks

A relationship line with no label between CUSTOMER and ORDER

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 relationship is named by a verb so that it reads as a sentence. In Chen notation the verb goes inside the diamond.

3. A Chen diamond drawn between crow's foot marks

Loses marks

Diamond and crow's foot together

Correct

Crow's foot only

Use one notation. Diamonds belong to Chen notation, end marks to crow's foot.

Can you answer these five relationship questions?

One question per idea on the page. Answer, then open the worked answer.

Question 1. A ROOM's primary key is (building_id, room_no). Is the BUILDING to ROOM line solid or dashed?

Worked answer

Solid. The room's key contains building_id, so the relationship is identifying.

Question 2. How do you draw a relationship where a person is married to another person?

Worked answer

As a recursive relationship: one line from PERSON back to PERSON, labelled married to, with zero or one at both ends.

Question 3. Students and clubs are many to many, and the date each student joined a club must be stored. Where does the date go?

Worked answer

In an associative entity such as MEMBERSHIP between STUDENT and CLUB. The date belongs to the pair, so it cannot sit in either entity.

Question 4. What is a double diamond in Chen notation?

Worked answer

The identifying relationship of a weak entity, the relationship through which the weak entity gets the key of its owner.

Question 5. Your teacher's ERD shows an arrow from ORDER to CUSTOMER. What is the most likely meaning?

Worked answer

It is borrowed from UML or data structure diagrams. In UML it means an order can navigate to its customer. Ask which notation the course uses, and do not read it as cardinality.

Questions

What are the ER diagram relationship symbols?

A line (crow's foot) or a diamond (Chen) between entities, labelled with a verb. Solid and dashed lines, double diamonds and double lines add identifying and participation detail.

What do the arrows mean in an ERD?

ER notations do not use arrowheads. An arrow on an ERD comes from UML, where it means navigability, or from older data structure diagrams, where it points from the one to the many record type.

What are ERD line symbols?

A solid line for an identifying relationship and a dashed line for a non-identifying one. The marks at the line ends are cardinality symbols.

What does a diamond mean in an ER diagram?

A relationship in Chen notation. The verb is written inside, and lines join it to each entity that takes part.

How is a many to many relationship shown?

With a crow's foot at both ends of the line, or M and N on a Chen diamond. In a logical model it is replaced by an associative entity.

What is a recursive relationship in an ER diagram?

A relationship between instances of one entity, drawn as a line that leaves the entity and comes back to it, such as an employee managing employees.

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 →