Understading cardinality notation and being able to explain them will go a long way in your database design and implementation. Here we look at a simple explanation of the symbols. (Credit to Data Warehousing for Business Intelligence by University of Colorado System on Coursera)

Symbols in the above diagram and their meanings:

Oval: means 0

Perpendicular line: means 1

Crow’s foot: means many (0 or more); unconstrained

– Some drawing tools support exact cardinalities (numbers)

Placement or position of the cardinality:

Inside symbol: minimum cardinality

Outside symbol: maximum cardinality

– How to read the cardinality: You will have to Interpret the far cardinality symbols: near the other entity type.

 

Hence:

– Course is related to a min of 0 and max of many offerings

– Offering is related to a min of 1 and max of 1 courses (exactly one)

Important Cardinalities and their Classifications:

Classification by common values for minimum and maximum cardinalities

Minimum cardinality based:

Min cardinality of one: mandatory; makes entity types existent dependent

Min cardinality of 0: optional; similar to a FK that allows null values

Maximum cardinality based:

Functional: max cardinality of 1; mathematics based

1-M: max cardinalities are 1 and M

M-N: max cardinalities are many in both directions

1-1: max cardinality is one in both directions (not common)

Existence dependency: an entity that cannot exist unless another related entity exists. A mandatory relationship produces an existence dependency.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *