IT lexicon › Database › Key field

Key field

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

A field or group of fields defined in the schema to uniquely identify each record of a given type.

A key field is how computers keep records apart—without a unique identifier, the computer cannot distinguish one identical-looking record from another. In many early systems (ISAM, Btrieve), the user had to choose and manage the key manually; relational databases introduced the concept of "primary key" as an obligatory, system-enforced type of key field. A record with the same key value as one already in the database typically could not be created.

Key fields were used for indexing and searching—the database could build a tree structure (often a B-tree) over the key field to quickly locate records without a full table scan. Composite keys (multiple fields together) enabled more flexible uniqueness constraints but complicated index implementation.

← Back to the lexicon