top of page

Learn Computer Science
Developing a more interesting World
"Computer science is no more about computers than astronomy is about telescopes."
Edsger Dijkstra
Free beginner - intermediate level computer science tutorials
Keys
There are 4 types of keys we will learn here:
-
Primary Key
-
Foreign Key
-
Candidate Key
-
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