ER diagram symbols
ER diagrams use three families of symbols: crow’s foot (the notation database tools draw), Chen (the one textbooks teach) and UML (class diagrams borrowed for data). In all three, a table or entity is a box and a relationship is a line between boxes; what differs is how each notation writes cardinality — how many rows on one side a row on the other side can have. Crow’s foot spells it with marks on the line ends (a bar for one, a circle for zero, a three-pronged foot for many), and every line is read twice, once toward each table. Every symbol below is shown with its reading, drawn by ErdDocs in the same notation it puts on your own schema in the tool below.
What do the crow’s foot line-end symbols mean?
Everything in crow’s foot happens at the ends of the line. Each end stacks up to two marks, and the one closest to the table is the maximum; the outer one is the minimum:
| Symbol | Name | How it reads | Example |
|---|---|---|---|
| Exactly one | Exactly one is bar + bar: at least one, at most one | an order belongs to exactly one customer | |
| Zero or one | Zero or one is circle + bar: optional, at most one | a customer has at most one loyalty card | |
| One or many | One or many is bar + crow’s foot: at least one | an order contains at least one line item | |
| Zero or many | Zero or many is circle + crow’s foot: any number, including none | a customer has zero or many orders |
Reading a whole line
A relationship line is read twice, once toward each table. The classic shop example:
orders: a customer has zero or many orders. Toward customers: an order belongs to exactly one customer.The full reading rules — and what the marks mean when a schema is only half-known — are on the crow’s foot notation page; which combination to pick is a question of cardinality.
Chen vs crow’s foot vs UML
| Concept | Chen | Crow’s foot | UML |
|---|---|---|---|
| Entity / table | Rectangle | Box with the column list inside | Class box |
| Attribute | Oval linked to the entity | A row inside the table box | A field in the class box |
| Relationship | Diamond between entities | A line with cardinality marks at each end | Association line |
| Cardinality | 1, N, M letters near the diamond | Bar, circle and crow’s foot marks on the line ends | 1, 0..1, 1..*, * multiplicities |
| Primary key | Underlined attribute name | Key marker on the column row | Stereotype or property string |
Rule of thumb: Chen while the schema is an idea, UML when the diagram lives next to application code, and crow’s foot once it is a database — the case ErdDocs draws, straight from the schema you paste.
One symbol the textbooks skip: the dashed line
Real dumps are often missing their foreign keys — Rails, Django and Laravel apps frequently enforce relationships in application code, so the database declares nothing. ErdDocs adds a symbol for that case instead of drawing nothing: a solid line is a relationship the database declares, a dashed line is one matched from column names (user_id → users). The distinction matters: one is a constraint, the other is a well-founded guess.
See the symbols on a real schema
The fastest way to learn the symbols is to watch them appear from DDL you understand. Below, ErdDocs generates the diagram from the shop schema: the maximum mark sits at each end — the crow’s foot for many, a bar for one — and the full cardinality is named on a plate when you select a line. Paste your own pg_dump --schema-only or Prisma schema to see yours; parsing runs in your browser.
FAQ
What do the crow’s foot symbols mean?
Each line end stacks up to two marks. The mark closest to the table is the maximum: a bar means “at most one”, the three-pronged crow’s foot means “many”. The outer mark is the minimum: a bar means “at least one”, a circle means “zero is allowed”. So circle + crow’s foot reads “zero or many”, bar + bar reads “exactly one”.
Which notation should I use — Chen or crow’s foot?
Chen for teaching and conceptual modeling: its diamonds make relationships first-class, which is what a lecture needs. Crow’s foot for real databases: one box per table with its columns inside, which is what a schema actually looks like. Nearly every database tool draws crow’s foot, ErdDocs included — paste a dump, a Prisma schema or framework migrations and it marks the many end of every line from the foreign keys and unique constraints it finds.
What is the symbol for a many-to-many relationship?
A crow’s foot on both ends of the line. In a physical schema the many-to-many is implemented through a junction table (order_items between orders and products), so ErdDocs and other tools that draw real databases show two one-to-many lines meeting at the junction table instead of a single many-to-many line — including the junction tables Prisma and TypeORM generate for you.
Why do database tools not draw Chen diamonds and ovals?
Because in a physical database the things Chen draws separately collapse into tables and columns: an attribute oval is a row inside the table box, and a relationship diamond is either a foreign key column or a junction table. Drawing them as separate shapes would double the diagram’s size without adding a fact.
Related
- ER diagram — entities, relationships and where a conceptual model turns into tables.
- Crow’s foot notation — the reading rules, with worked examples.
- ER diagram cardinality — how a real database determines which marks a line gets.
- ER diagram examples — eleven complete schemas, each with its diagram and dictionary.