Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Relational database
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Primary key=== {{Main|Unique key|Primary key}} Every [[Relation (database)|relation]]/table has a primary key, this being a consequence of a relation being a [[Set (mathematics)|set]].{{Sfnp|Date|1984|p=268}} A primary key uniquely specifies a tuple within a table. While natural attributes (attributes used to describe the data being entered) are sometimes good primary keys, [[surrogate key]]s are often used instead. A surrogate key is an artificial attribute assigned to an object which uniquely identifies it (for instance, in a table of information about students at a school they might all be assigned a student ID in order to differentiate them). The surrogate key has no intrinsic (inherent) meaning, but rather is useful through its ability to uniquely identify a tuple. Another common occurrence, especially in regard to N:M cardinality is the [[Compound key|composite key]]. A composite key is a key made up of two or more attributes within a table that (together) uniquely identify a record.<ref>{{Cite book |last1=Connolly |first1=Thomas M |title=Database systems: a practical approach to design, implementation, and management |last2=Begg |first2=Carolyn E |publisher=Pearson |year=2015 |isbn=978-1-292-06118-4 |edition=global |location=Boston Columbus Indianapolis |pages=416}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)