Super, candidate, primary, alternate, and foreign keys — on one relation.
Concept
—
Step
1/1
Legend
Key column(s)
Referenced table
AI Tutor Workspace
—
In a nutshell
Keys are how a database tells rows apart and links tables together. Any set of columns that pins down a row with no duplicates is a super key; trim it until nothing is wasted and you have a candidate key. You pick one candidate to be the official identifier — the primary key — and the leftover candidates become alternate keys. A foreign key is different: it doesn't identify its own rows, it points at another table's primary key to keep the two tables consistent.
Ready
Press play to begin the cinematic walkthrough.
A super key uniquely identifies rows; a candidate key is a minimal super key; the primary key is the chosen candidate; the rest are alternate keys; a foreign key points at another table’s primary key.