[go: nahoru, domu]

Jump to content

Natural key: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
BG19bot (talk | contribs)
m →‎top: WP:CHECKWIKI error fix for #61. Punctuation goes before References. Do general fixes if a problem exists. -
Removed awkward, non-sequitir sentence.
Line 1: Line 1:
{{Distinguish|Natural minor}}
{{Distinguish|Natural minor}}
A '''natural key''' (also known as '''business key'''<ref>[http://www.dbdebunk.com/2012/11/on-kinds-of-keys.html On Kinds of Keys]</ref>) is a type of [[unique key]], found in [[relational model]] [[database]] design, that is formed of attributes that already exist in the real world. It is used in business-related columns.<ref>[http://www.bcarter.com/intsurr1.htm Intelligent Versus Surrogate Keys]</ref> In other words, a natural key is a [[candidate key]] that has a logical relationship to the attributes within that [[row (database)|row]]. A natural key is sometimes called ''domain key''.<ref>[http://c2.com/cgi/wiki?AutoKeysVersusDomainKeys Auto Keys Versus Domain Keys]</ref>
A '''natural key''' (also known as '''business key'''<ref>[http://www.dbdebunk.com/2012/11/on-kinds-of-keys.html On Kinds of Keys]</ref>) is a type of [[unique key]], found in [[relational model]] [[database]] design, that is formed of attributes that already exist in the real world. It is used in business-related columns.<ref>[http://www.bcarter.com/intsurr1.htm Intelligent Versus Surrogate Keys]</ref> In other words, a natural key is a [[candidate key]] that has a logical relationship to the attributes within that [[row (database)|row]]. A natural key is sometimes called ''domain key''.<ref>[http://c2.com/cgi/wiki?AutoKeysVersusDomainKeys Auto Keys Versus Domain Keys]</ref>

You can not use US citizen's social security number as a natural key<ref>{{Cite news|url=http://www.computerworld.com/article/2552992/it-management/not-so-unique.html|title=Not So Unique|last=Hayes|first=Frank|newspaper=Computerworld|language=en|access-date=2017-01-30}}</ref>


The main advantage of a natural key over a [[surrogate key]], which has no meaning outside the database environment, is that it already exists; there is no need to add a new, artificial [[column (database)|column]] to the [[logical schema|schema]]. Using a natural key (when one can be identified) also simplifies data quality: It ensures that there can only be one row for a key; this [[single version of the truth]] can be verified because the natural key is based on a real-world observation.
The main advantage of a natural key over a [[surrogate key]], which has no meaning outside the database environment, is that it already exists; there is no need to add a new, artificial [[column (database)|column]] to the [[logical schema|schema]]. Using a natural key (when one can be identified) also simplifies data quality: It ensures that there can only be one row for a key; this [[single version of the truth]] can be verified because the natural key is based on a real-world observation.

Revision as of 23:19, 4 February 2017

A natural key (also known as business key[1]) is a type of unique key, found in relational model database design, that is formed of attributes that already exist in the real world. It is used in business-related columns.[2] In other words, a natural key is a candidate key that has a logical relationship to the attributes within that row. A natural key is sometimes called domain key.[3]

The main advantage of a natural key over a surrogate key, which has no meaning outside the database environment, is that it already exists; there is no need to add a new, artificial column to the schema. Using a natural key (when one can be identified) also simplifies data quality: It ensures that there can only be one row for a key; this single version of the truth can be verified because the natural key is based on a real-world observation.

References