What are super, primary, candidate, and foreign keys?
A super key is a set of attributes of a relation schema upon
which all attributes of the schema are functionally
dependent. No two rows can have the same value of super
key attributes.
A Candidate key is a minimal superkey, i.e., no proper
subset of Candidate key attributes can be a superkey.
A Primary Key is one of the candidate keys. One of the
candidate keys is selected as most important and becomes
the primary key. There cannot be more than one primary
key in a table..
A Foreign key is a field (or collection of fields) in one table
that uniquely identifies a row of another table.