Are there any differences among a Surrogate Key, Synthetic Key, and an Artificial Key?
I'm not clear on the exact difference.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With