Candidate Key

A candidate key is an attribute (or set of attributes) that can uniquely identify each tuple in a table.

Explanation:

  • A table can have multiple candidate keys.
  • The Primary Key is chosen from the candidate keys.
  • Candidate keys must be unique and not null.

Example:

For a Students table:

student_idemailname
101alice@email.comAlice

Here, student_id and email are candidate keys, as both uniquely identify a student.