SQL Candidate key with Example

Candidate Key

it is the attribute/column or a set of attributes/columns in a relation/table that qualifies for uniqueness of each tuple/row. A relation/table can have one or more than one Candidate Keys.

A Candidate key is also known as a minimal Super key.

Properties of Candidate key:

  • It must contain unique values
  • Candidate key may have multiple attributes
  • Must not contain null values
  • It should contain minimum fields to ensure uniqueness
  • Uniquely identify each record in a table
StudID Roll No First Name Last Name Email
1 11 Prayag Verma [email protected]
2 12 Rahul Raz [email protected]
3 13 Pankaj Jacker [email protected]
4 14 Mukesh Mugu [email protected]
5 15 Rakesh Ravi [email protected]

Read Also: