Database: What is a Synthetic Key?

Well, a synthetic key is really the surrogate key. Primarily, in MySQL which commonly use a "current database" (non-temporal), surrogate key are either primary keys or columns that emphasizes uniquness with its column values but with its functionality that is a system generated like an auto increment key or a procedural generated that is not derived from any application data from a database. Usually, the most significant meaning of a surrogate key is the primary key.  It is also possible that the surrogate key exists in addition to the database-generated UUID (for example, an HR number for each employee other than the UUID of each employee).

Surrogate key is in contract to Natural Key which a natural key is defined customarily by the programmer or by the input, let say, is defined by it's national id number of a person or any number that is inputted from person's data that is not relying on a system generated UUID or a natural key is a user generated data, not system generated.

Surrogate key may differ in meaning when talking about Temporal Database. Please check or read from Wikipedia, http://en.wikipedia.org/wiki/Surrogate_key#Surrogates_in_practice.



Site's that can help you also understand what it means can be referenced here,

http://siebel.ittoolbox.com/groups/technical-functional/siebel-analytics-l/what-is-the-difference-between-a-primary-key-and-a-surrogate-key-1307246

http://en.wikipedia.org/wiki/Surrogate_key

http://blog.mclaughlinsoftware.com/2009/05/16/surrogate-keys-uses/

http://stackoverflow.com/questions/7971575/natural-key-vs-surrogate-key-an-innodb-foreign-key

Comments

Popular posts from this blog

Converting sectors into MB - Useful in understanding the sectors in iostat in Linux

What is Disk Contention?

Installing MySQL from source: Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)