Skip to main content

Candidate, Composite & Unique Keys

Learn Candidate, Composite & Unique Keys (Database Fundamentals, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Introduction A candidate key is any minimal column set that could uniquely identify a row; one becomes the PK, the rest are alternates. A composite key uses two or more columns together. A unique key enforces uniqueness but, unlike a PK, may allow NULLs and a table can have many.

More lessons in Database Fundamentals