Difference Between Cardinality and Modality

Data StorageData StructureDatabase

In this post, we will understand the difference between cardinality and modality −

Cardinality

  • It tells about the maximum number of associations between rows of tables.

  • There are different types: One-to-one, one-to-many, many-to-many.

  • One to one is where the occurrence of object ‘A’ can relate to one and only one occurrence of object ‘B’, and vice-versa.

  • One to many is where the occurrence of object ‘A’ can relate to multiple occurrences of object ‘B’, but object ‘B’ can relate to a single occurrence of object ‘A’.

  • Many to many is where multiple occurrences of object ‘A’ can relate to multiple occurrences of object ‘B’, and vice-versa.

Modality

  • It tells about the minimum number of row associations in a table.

  • There are different types: Nullable and Not nullable.

  • Nullable columns accept an empty field.

  • The non-nullable column doesn’t accept null values.

raja
Published on 27-Apr-2021 06:46:16
Advertisements