A candidate key is any super key which cannot be further reduced by removing attributes — that is, no proper subset of it is also a super key.
Formally, a set of attributes
Every relation has at least one candidate key. All candidate keys of a relation have the same property of uniquely identifying tuples — the choice of which one to designate as the primary key is a design decision.
Consider a table Employee with the following attributes
EmployeeID: Unique ID assigned by the companySSN: Social Security NumberName: Name of the employeeDepartment: The department the employee works atSome examples of it's candidate keys are the following sets:
{EmployeeID}: Is unique for every Employee{SSN}: Like the ID is unique for every EmployeeConversely non-candidate keys which are still super keys are the following
{EmployeeID, SSN}: The SSN or EmployeeID are redundant keys to identify a record.{EmployeeID, Name}: The Name attribute is redundant.