liveBook · Manning

Maximum cardinality

As explained in Grokking Relational Database Design

Maximum cardinality is the largest number of target-entity instances with which one source-entity instance can be associated.

Maximum cardinality is the largest number of target-entity instances that one source-entity instance can be associated with. In a directional relationship from A to B, it describes how many B instances one A instance may have. Crow’s Foot notation places this symbol on the relationship line near the target entity. section 5.5

Read maximum cardinality from simple relationship statements:

  • “A user has zero, one, or more accounts” gives the user-to-account relationship a maximum cardinality of many. section 5.5
  • “An account is associated with one and only one user” gives the account-to-user relationship a maximum cardinality of one. section 5.5
  • A one-to-one relationship has a maximum cardinality of one in both directions; its minimum cardinalities may still be zero or one. section 5.6

Department and manager

If each department has one manager and each manager works for one department, both directions have maximum cardinality one. Relaxing the department-to-manager minimum to zero can make foreign-key implementation possible without changing that maximum. section 5.6

How Grokking Relational Database Design covers it

How deep it goes
Explains zero, one, and many notation through relationship sentences and connects one-to-one limits to foreign-key implementation.
Examples
Uses user-account and department-manager relationships to contrast many and one maximum cardinalities.
What it assumes
Defines directional relationships, source and target entities, and cardinality symbols before applying maximum cardinality.
What you can do after
Evaluate relationship statements and diagrams by identifying whether their maximum cardinality is one or many.
How it connects
Connects maximum cardinality with cardinality, minimum cardinality, one-to-one relationships, E-R diagrams, and foreign keys.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Relational Database Design. The section links point to the parts of the book it draws on.