You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cardinality has different meanings depending on the context of what's being discussed. In data engineering, we mainly use cardinality when talking about a data model's relationships and when talking about the statistics of a particular column in a database table.
8
+
9
+
## Cardinality (Data Modeling)
10
+
11
+
The number of rows in one table that relate to rows in another table. Common types include one-to-one, one-to-many, and many-to-many. It's used to define and analyze relationships in data models.[^1]
12
+
13
+
## Cardinality (SQL Statements)
14
+
15
+
The number of distinct values in a column/expression. Low cardinality means many repeated values, while high cardinality means most values are unique.[^2] Database engines can use this information to optimize SQL queries.
%% wiki footer: Please don't edit anything below this line %%
21
+
22
+
## This note in GitHub
23
+
24
+
<spanclass="git-footer">[Edit In GitHub](https://github.dev/data-engineering-community/data-engineering-wiki/blob/main/Concepts/Cardinality.md"git-hub-edit-note") | [Copy this note](https://raw.githubusercontent.com/data-engineering-community/data-engineering-wiki/main/Concepts/Cardinality.md"git-hub-copy-note")</span>
25
+
26
+
<spanclass="git-footer">Was this page helpful?
27
+
[👍](https://tally.so/r/mOaxjk?rating=Yes&url=https://dataengineering.wiki/Concepts/Cardinality) or [👎](https://tally.so/r/mOaxjk?rating=No&url=https://dataengineering.wiki/Concepts/Cardinality)</span>
0 commit comments