You are here

Candidate key

19 October, 2015 - 15:48
  • a simple or composite key that is unique and minimal
  • unique – no two rows in a table may have the same value at any time
  • minimal – every column must be necessary for uniqueness
  • For example, for the entity

Employee(EID, First Name, Last Name, SIN, Address, Phone, BirthDate, Salary, DepartmentID)

Possible candidate keys are EID, SIN

FirstName and Last Name – assuming there is no one else in the company with the same name, Last Name and DepartmentID – assuming two people with the same last name don’t work in the same depart ment.

EID, SIN are also candidate keys