AI engineering glossary · SQL databases

What is candidate key?

Candidate key: Any minimal set of columns that could uniquely identify every row, meaning no column can be removed without losing uniqueness. A table may have several; one is chosen as the primary key and the rest remain alternatives.

Level: intermediateTopic: SQL databases

Candidate key: an example

In an employees table, both employee_id and official_email are unique, so each is a candidate key; the team picks employee_id as the primary key.

Related terms

More SQL databases terms

Where you learn it

Candidate key is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.