IT lexicon › Database › Alternate key

Alternate key

Database På svenska → Updated: 2026-11-12

A column or column combination that uniquely identifies a row but is not the primary key.

In the relational model, a table can have multiple candidates for uniquely identifying a row. You choose one as the primary key — often an ID — but other columns may also be unique. A social security number, email address, or vehicle registration number can uniquely identify a row just as well; only one is designated as primary. The rest are alternate keys.

Databases often index alternate keys separately to speed lookups based on these identifiers. This is a core part of data modeling, especially when a system must support searches on multiple unique fields without forcing one index to be the default lookup path. The choice of which key is "primary" is usually arbitrary from the data perspective but may matter for performance or consistency semantics.

← Back to the lexicon