What is an ER diagram and how to read one
ER diagram purpose, entity rectangles, attribute ellipses, relationship diamonds, crow's foot notation, reading cardinality, ER vs schema diagram
The ER Diagram
An Entity-Relationship (ER) diagram is a visual map of your entities, their attributes, and how they relate — drawn before any SQL is written. It is the single artifact that lets developers, product managers, and stakeholders agree on structure without reading DDL.
Notation
Two notations dominate. The original Chen notation uses rectangles for entities, ellipses for attributes, and diamonds for relationships. Modern tools (Lucidchart, dbdiagram.io, draw.io) use crow's foot notation, which is faster to read:
- A single vertical line means "exactly one"
- A crow's foot (three-pronged fork) means "many"
- A circle means "zero" (optional)
Read a line left to right and right to left. A line between Customer and Order labeled with one-side on Customer and crow's foot on Order reads: one customer has many orders; each order belongs to exactly one customer.
ER vs Schema Diagram
An ER diagram shows the conceptual model — it may still have many-to-many relationships. A schema diagram (also called a physical diagram) shows actual tables including junction tables, data types, and PK/FK constraints. You produce the schema diagram after normalization. Build the ER diagram first.
