Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a difference between Surrogate key, Synthetic Key, and Artificial Key?

Are there any differences among a Surrogate Key, Synthetic Key, and an Artificial Key?

I'm not clear on the exact difference.

like image 218
Harshad Avatar asked Nov 05 '12 04:11

Harshad


People also ask

Is surrogate key an artificial key?

Surrogate keys represent a purely arbitrary number that is often computer generated and is unknown outside the application system. They occur in two flavors. The first is an artificial key and the second is an identity column.

What is the difference between surrogate key and composite key?

Surrogate key: an attribute that can uniquely identify a row, and does not exist in the real world. Composite key: more than one attribute that when combined can uniquely identify a row.

What is difference between unique key and surrogate key?

The unique key in your database that you decide best uniquely identifies a record in the table is the main key. All tables should have a primary key because you need to be able to uniquely identify each record if you ever need to change or delete one. An artificially produced key is known as a surrogate key.

What is the difference between a surrogate key and a business key?

In a temporal database, it is necessary to distinguish between the surrogate key and the business key. Every row would have both a business key and a surrogate key. The surrogate key identifies one unique row in the database, the business key identifies one unique entity of the modeled world.


1 Answers

Surrogate key, synthetic key and artificial key are synonyms. Technical key is another one. They all mean "primary key which doesn't have a business meaning". They are distinct from natural or business keys which have a meaning beyond the system at hand.

For instance, consider the SO user account. We are identified by two keys. The natural key is the identifier we use to login in to this site, such as our OpenID name. But because these things are long unwieldy strings (and because SO allows us a choice of different login options) the database identifies us by a User ID which is a generated number. That UserID is a synthetic/surrogate/artifical key.

like image 153
APC Avatar answered Sep 20 '22 07:09

APC