Platform / Lessons / ER Diagrams
Data Modelling

Let's make sense of ER Diagrams.

Before a single table exists, you sketch the world it describes. Meet entities, attributes and relationships in Chen's notation — and learn to read cardinality at a glance.

01

What you'll learn

This is the full written version of an interactive, slide-by-slide lesson deck used in teaching. Everything covered in the deck is below — open the interactive version to work through it with live diagrams, worked examples and a practice quiz where included.

02

Lesson contents

  1. Lesson Plan
  2. What & Why ER Diagrams?
  3. What Is an ER Diagram?
  4. Why Do We Need Them?
  5. Two Popular Notations
  6. Chen's vs. Crow's Foot Notation
  7. Chen's Notation — The Shapes
  8. Chen's Shapes · 1 of 4
  9. Chen's Shapes · 2 of 4
  10. Chen's Shapes · 2b — Special Attribute
  11. Chen's Shapes · 3 of 4
  12. Chen's Shapes — Summary
  13. Sec Cardinality
  14. Cardinality · One-to-One
  15. Cardinality · One-to-Many
  16. Cardinality · Many-to-Many
  17. Cardinality — Summary
  18. Drawing a Complete ER Diagram
  19. How to Draw an ER Diagram
  20. Section 05 — Complete Example
  21. How to Read the Diagram
  22. Key Takeaways

Lesson Plan

What & Why ER Diagrams?

What Is an ER Diagram?

Why Do We Need Them?

Fixing a design mistake on paper takes minutes. Fixing the same mistake in a live database can take days.

Chen's vs. Crow's Foot Notation

Chen's Notation — The Shapes

Chen's Shapes · 1 of 4

Test: Can you list many of them? (Many students, many courses?) → It's an entity.

Chen's Shapes · 2 of 4

Chen's Shapes · 2b — Special Attribute

🔑 Two students may share a name — but each must have a unique StudentID. Therefore StudentID is the key attribute.

Chen's Shapes · 3 of 4

Chen's Shapes — Summary

Sec Cardinality

Cardinality · One-to-One

Each instance on side A relates to exactly one on side B, and vice versa.

Cardinality · One-to-Many

One instance on side A relates to many on side B. But each B belongs to only one A.

Cardinality · Many-to-Many

Many instances on side A relate to many instances on side B, and vice versa.

Cardinality — Summary

One on side A → many on side B; each B has only one A

Drawing a Complete ER Diagram

How to Draw an ER Diagram

Scenario: A university has students and courses. Students can enroll in many courses. Each course is taught by one teacher. Teachers can teach many courses.

Section 05 — Complete Example

How to Read the Diagram

💡 Every M:N relationship becomes a separate junction table (e.g., ENROLLMENT) in the relational database. 1:N relationships become a foreign key.

Key Takeaways

Common questions

What is an ER diagram?

An entity-relationship diagram is a blueprint for a database, drawn before any code is written. It shows the real-world things you want to store (entities), their properties (attributes), and how they connect (relationships). Peter Chen introduced the notation in 1976 and it is language-neutral, so any team can read it.

What is the difference between Chen's notation and Crow's Foot?

Chen's notation uses distinct geometric shapes — rectangles for entities, ellipses for attributes, diamonds for relationships — and labels cardinality with 1, N and M. Crow's Foot draws entities as boxes listing their attributes and encodes cardinality in the line ending itself. Chen's is clearer for teaching the concepts; Crow's Foot is more compact and more common in industry tooling.

How do you read 1:1, 1:N and M:N cardinality?

1:1 means each instance on one side matches exactly one on the other. 1:N means one instance on the left side can match many on the right, but each of those matches only one on the left. M:N means instances on both sides can match many on the other, and it always becomes a separate junction table when you build the database.

How does an ER diagram map to actual database tables?

Each entity becomes a table, each attribute becomes a column, and each key attribute becomes the primary key. One-to-many relationships become a foreign key on the many side; many-to-many relationships become a new junction table holding both foreign keys.

Related lessons

Work through it interactively

The interactive deck adds live diagrams, step-by-step reveals and practice activities that this written version can't carry.