Database Design Principles
Cardinality in Database
Database Management System (DBMS)
What is cardinality?
As per the dictionary meaning, the word “cardinality” means the number of elements in a set or group.
What is cardinality in a database?
In the context of a database system, “cardinality” refers to the uniqueness of data values contained in a particular column. It also sometimes refers to the relationships between tables — cardinality between tables can be one-to-one, many-to-one, or many-to-many.
Higher cardinality
High cardinality means that the column contains a large percentage of totally unique values. High cardinality column values are typically identification numbers, email addresses, etc.
Note that high cardinality may influence the performance a lot depending on what database we use!
Low cardinality
Low cardinality means that the column contains a lot of “repeats” in its data range. Low cardinality column values are typically status flags, boolean values, etc.