Ask the Expert

Cardinality explained

I am an Oracle DBA in training currently studying for the Oracle 91 Fundamentals I exams. What exactly does the term "cardinality" mean as related to tables?

    Requires Free Membership to View

Cardinality does not refer to a table, but rather the number of distinct values of data in a table's column. In a table called EMPLOYEES, you might have a column called GENDER, which typically has two values MALE and FEMALE. In this case, the cardinality of the data in the GENDER column is two. There are two distinct values. In the same table, you might have the EMPNO column. Each employee number is a distinct value. So for 5,000 employees, you will have 5,000 (cardinality) distinct employee numbers. The GENDER column is a low cardinality column and the EMPNO column is a high cardinality column.

This was first published in August 2004

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: