Surrogate key
Meaning in software engineering, with examples
In software engineering, 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
We switched from national ID numbers to a surrogate key after a customer's ID was entered wrongly.
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
Related terms
This word in other fields
The same English word can have a different meaning in another field:
More terms: Databases and Persistence
Practise with graded reading
Reading at the right level is the fastest way to make new words stick. Pick free English books by level:
