Cardinality and Modality
Cardinality and modality are two different terms in the Database. Let’s see one one by
it shows the maximum number of entities in one entity set, which can be associated with the number of entities of another entity set.
Maximum Cardinality can be one or many.
- One: the cardinality of one tells that single instance of an entity. The symbol of vertical line | is used for one cardinality.
- Many: the cardinality of many indicates the multiple instances of an entity. The symbol of crowfoot () is used for many cardinalities.
A minimum number of instances of one entity set that can associate with each instance of another entity set is known as modality.
The minimum modality can be Zero (Optional) or One (Mandatory)
- Optional: the Modality of Zero tells that no instance of an entity. Represented by a small circle.
- Mandatory: it indicates a single instance of an entity. Represented by vertical line |.
ER Diagram For Cardinality And Modality
From the Entity side, the first symbol represents cardinality, and the second represents modality. ER diagrams and their notations are explained below.
Let’s explain Some more examples of cardinality and modality in the ER Model.
Example: 01 Student applies for group
Many or At least one student must apply for Group and Similarly, and Many or At least one group must assign for Student. It is a many-to-many relationship example.
Example 02: Student Deposits FEE
One or many students can deposit a fee for a specific group, but the fee deposit by a student for a specific group will always be only one.