Databases & SQL vocabulary · Keys and Constraints

Surrogate key

Meaning in databases & SQL, with examples

/ˈsɜːrəɡət kiː/nounCommon term

In databases & SQL, surrogate key means: An artificial key with no business meaning, such as an auto-increment number or a UUID, created only to identify each row.

In Turkish: vekil anahtar, yapay anahtar

How it is used

The opposite is a natural key, a real-world value such as a tax number or ISBN. Most modern schemas use surrogate keys because real-world values can change or repeat. A unique constraint on the natural key is still a good idea.

Example sentences

  1. We switched from national ID numbers to a surrogate key after a customer's ID was entered wrongly.

  2. Every table gets a surrogate key called id, plus unique constraints where needed.

Common collocations

  • use a surrogate key
  • surrogate key vs natural key
  • UUID
  • artificial key

This word in other fields

The same English word can have a different meaning in another field:

More terms: Keys and Constraints

Practise with graded reading

Reading at the right level is the fastest way to make new words stick. Pick free English books by level: