What is the relationship between a primary key and a candidate key?
Regarding this, what is a candidate key in relational database?
A candidate key is a column, or set of columns, in a table that can uniquely identify any database record without referring to any other data. Each table may have one or more candidate keys, but one candidate key is unique, and it is called the primary key.
Additionally, what is the difference between a candidate key and the primary key for a given relation What is a Superkey?
A candidate key is a set of columns that uniquely identifies rows and that contains no smaller ("proper") subset of columns that uniquely identifies rows. A superkey is a set of columns that uniquely identifies rows. So a candidate key is a superkey that contains no smaller superkey.
Primary keys - Contain one or more columns whose combined values uniquely identify every row in a table. Each table can have only one primary key. Alternate keys - Contain one or more columns whose combined values uniquely identify every row in a table.