Natural key or surrogate key: which is better?

SQL keys and table design · Freshers and experienced

Model answer

A natural key is real data (email, ISBN) that can change or be wrong. A surrogate key is a meaningless generated id that stays stable. Most designs use a surrogate primary key and a unique constraint on the natural key.

Learn this topic

Keys and Table Design: Why Data Is Split Into Tables in the course SQL for Beginners: Learn Databases Step by Step.

Sign in to add your own answer.

More questions