Archyno
Data modellingNotation reference

Crow's foot notation

Two symbols at each end of a line, and between them they encode every cardinality a relational database can enforce. The whole notation fits in a paragraph; getting the ends the right way round takes slightly longer.

8 min readER - crow's foot2 of 3

exactly onezero or oneone or morezero or moreOrderInvoiceEmployeeParking spaceOrderOrderLineCustomerOrder
Four lines, four cardinalities. Each pair of symbols is read at the end it sits on, and describes the entity at that end.

01Three symbols, four combinations

Crow's foot - properly, Information Engineering notation - puts two marks on each end of every relationship line. The one further from the entity is the maximum, and the one nearer the entity is the minimum.

ElementNotationWhat it means
Bara single stroke across the lineOne. As the outer mark it means "at most one"; as the inner mark, "at least one".
Crow's footthree prongsMany. Only ever the outer mark - a maximum with no ceiling.
Circlea small ringZero. Only ever the inner mark - the relationship is optional.

Combine them and there are exactly four possibilities, which is the entire notation:

ElementNotationWhat it means
Exactly oneBar and bar. Mandatory, single.
Zero or oneCircle then bar. Optional, single.
One or moreBar then crow's foot. Mandatory, multiple.
Zero or moreCircle then crow's foot. Optional, multiple.

02Which end the symbol describes

This is the one thing about crow's foot that is genuinely counter-intuitive, and it accounts for most misread diagrams. The symbols at an end describe the entity at that end, and you read them when travelling towards that entity.

On the fourth line of the diagram above, the crow's foot is at the Orderend. It does not mean "many customers". It means: for one customer, there are zero or more orders. Say it as a journey - "starting at a customer and following the line, I arrive at zero or more orders" - and the direction stops being ambiguous.

A practical habit that removes the problem entirely: write the verb phrase on the line in the direction it reads left to right, and check the reverse reading out loud before moving on. Thirty seconds per relationship, and it catches errors that survive months in a document.

03Identifying and non-identifying

The line style carries a second piece of information, and it is about keys rather than counts.

ElementNotationWhat it means
Non-identifyingDashed. The child has its own primary key and merely holds a foreign key to the parent. An Order has an order_id and separately records which customer it belongs to. The usual case.
IdentifyingSolid. The parent's key is part ofthe child's primary key, so the child cannot exist or be identified without it. A weak entity.

The test is one question: could this row be identified without knowing its parent? An order line numbered 3 is meaningless without knowing which order - that is identifying. An order belonging to customer 41 is still order 8817 regardless - that is non-identifying.

04Resolving a many-to-many

enrols inStudentCourseStudentEnrolmentPK FK student_idPK FK course_idenrolled_onCourse
The top line is legal in a conceptual model and unimplementable in any relational database. The bottom is the same fact, stored.

A crow's foot at both ends says "many to many", and no relational database can store that in two tables. The relationship becomes an entity of its own - a junction, associative, or link entity - holding a foreign key to each side.

Two things follow, and the second is the reason this is worth doing early rather than at implementation time:

  1. The junction usually has its own attributes. An enrolment has a date, a grade, a status. Those attributes had nowhere to live while the relationship was a line, and their absence was hiding a gap in the model.
  2. The junction deserves a real name. Enrolment, Booking, Assignment - not StudentCourse. A domain expert recognises the first and cannot review the second, and the name is usually a word the business already uses.

Note the keys in the junction above: both foreign keys together form the primary key, which is what stops the same student enrolling twice on the same course. That constraint came free from modelling it properly, and would otherwise have been a validation somebody remembered to write.

05Against the alternatives

ElementNotationWhat it means
Chen notationdiamonds and ovalsThe original. Relationships are diamonds and attributes are ovals hanging off entities, which is expressive and takes four times the space. Common in teaching, rare in practice.
UML multiplicity0..1, 1..*Numbers written at the line ends instead of symbols. More precise - it can say 2..5 - and slower to scan across a wall of tables.
IDEF1Xfilled circlesA US federal standard, close to crow's foot with different symbols and stricter rules about identifying relationships. You will meet it in government and defence work.
Crow's footCompact, scannable at a distance, and understood by every database tool. The default for good reasons.

Reach for it when

  • Any diagram with more than about six entities - it stays readable
  • An audience that includes DBAs and data engineers
  • A model that will become DDL, where the four cases map exactly onto constraints
  • Whiteboard work, because the symbols survive being drawn badly

Reach for something else when

  • You need a bound like 'between two and five' - use UML multiplicity
  • The audience is a UML-native software team and the model is domain classes
  • Teaching first principles, where Chen's diamonds make the relationship visible
  • A ternary relationship, which crow's foot cannot draw without a junction entity

None of this is exclusive. A great many real projects draw crow's foot for the database and a class diagram for the domain model, and keep both, because they are answering different questions about the same nouns.

06Common mistakes

  1. Symbols on the wrong end. The most common error in the notation. Read both sentences aloud.
  2. Everything optional. A circle on every inner position means the model asserts no rules, and every one of them becomes application code instead.
  3. Many-to-many left in a logical model. Fine conceptually, impossible physically. Resolve it and name the junction.
  4. Junction entities named by concatenation. OrderProduct tells a reviewer nothing; OrderLine tells them everything.
  5. Relying on dash style alone for identifying relationships. Tools disagree. Show the composite key in the box too.
  6. Unlabelled relationships. The verb is what makes the line readable aloud, and reading it aloud is the review.

With cardinality settled, the next question is what the tables should be at all - which is schema design: keys, normalization, and the trip from a model to DDL.

In one line each

  1. 01Outer symbol is the maximum, inner symbol is the minimum.
  2. 02Bar is one, crow's foot is many, circle is zero.
  3. 03The symbols describe the entity at their own end - read towards it.
  4. 04Every relationship has two true sentences; check both.
  5. 05Solid means the parent's key is part of the child's; dashed means it is not.
  6. 06A many-to-many becomes a named junction entity, usually with attributes of its own.
All articles