Difference between Cardinality and Modality
Cardinality: The number of occurrences of one object related to the number of occurrences of another object is specified by the metric of cardinality. Cardinality reflects the relationship between a row of one table and a row of another table. If we consider of a university with two tables: a table for a student and a table for a department. A department can have numerous students but a student can have only one department. This relationship reflects that single occurrences of the department entity can be related to one or more occurrence of the student entity but student entity can be related to only one occurrence of department entity. This is called one to many relationships.
Modality: Modality describes the least number of row connections. Whether a certain data object must participate in a relationship or not is signified by the term modality. If the relationship is optional or if there is no participation then the modality value is “0”. If there is a compulsion for the occurrence of a relationship then the modality value is displayed as “1”.
Cardinality | Modality |
---|---|
1. Maximum number of occurrences between the table row. | 1. Minimum number of row connections is consider as modality. |
2. There are four types of cardinality states (one-to-one (1:1), one-to-one (1:N), many-to-many (M:N), Many-to-one (M:1)). | 2. There are 2 types of modality states (null able and not null able). |
3. Cardinality signifies the number of occurrence an object possesses for another of object. | 3. Modality signifies whether the relation is needed to be made or not. |
Recommended Posts:
Contributed By: Romana Rahman Ema