top of page

Keys

Tutoring Databases > Keys

There are 4 types of keys we will learn here:

  1. Primary Key

  2. Foreign Key

  3. Candidate Key

  4. Super Key

Primary Key

A Primary Key : 

  • uniquely defines each row's characteristics.

  • can not be duplicated by other rows.

  • is not allowed NULL values.

Super Key
Foreign Key

A Foreign Key:

  • is an "ambassador" for another table's Primary Key.

  • is intended to match another table's Primary Key.

Candidate Key

A Candidate Key is a column or set of columns that uniquely identify any row without any data.

A Super Key is a combination of attributes that determines ALL the other attributes in the table i.e. determines a whole row.

bottom of page