Superkey

Superkey

A superkey is defined in the relational model of database organization as a set of attributes of a relation variable (relvar) for which it holds that in all relations assigned to that variable there are no two distinct tuples (rows) that have the same values for the attributes in this set. Equivalently a superkey can also be defined as a set of attributes of a relvar upon which all attributes of the relvar are functionally dependent.

Note that if attribute set "K" is a superkey of relvar "R", then at all times it is the case that the projection of "R" over "K" has the same cardinality as "R" itself.

Informally, a superkey is a set of columns within a table whose values can be used to uniquely identify a row. A candidate key is a minimal set of columns necessary to identify a row, this is also called a minimal superkey. For example, given an employee table, consisting of the columns employeeID, name, job, and departmentID, we could use the employeeID in combination with any or all other columns of this table to uniquely identify a row in the table. Examples of superkeys in this table would be {employeeID, Name}, {employeeID, Name, job}, and {employeeID, Name, job, departmentID}.

In a real database we don't need values for all of those columns to identify a row. We only need, per our example, the set {employeeID}. This is a minimal superkey – that is, a minimal set of columns that can be used to identify a single row. So, employeeID is a candidate key.

Example

In this example, the possible superkeys are:

* {Monarch Name, Monarch Number}
* {Monarch Name, Monarch Number, Royal House}

See also

* compound key
* candidate key
* primary key
* alternate key
* foreign key


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • superkey — noun Any set of attributes of a relation variable (relvar) that serve to identify a single tuple or row, no other tuple having the same value for every attribute in the set …   Wiktionary

  • Relational model — The relational model for database management is a database model based on first order predicate logic, first formulated and proposed in 1969 by Edgar Codd. [ Derivability, Redundancy, and Consistency of Relations Stored in Large Data Banks , E.F …   Wikipedia

  • Candidate key — In the relational model, a candidate key of a relvar (relation variable) is a set of attributes of that relvar such that # at all times it holds in the relation assigned to that variable that there are no two distinct tuples with the same values… …   Wikipedia

  • Database normalization — In the design of a relational database management system (RDBMS), the process of organizing data to minimize redundancy is called normalization. The goal of database normalization is to decompose relations with anomalies in order to produce… …   Wikipedia

  • Third normal form — The third normal form (3NF) is a normal form used in database normalization. 3NF was originally defined by E.F. CoddCodd, E.F. Further Normalization of the Data Base Relational Model. (Presented at Courant Computer Science Symposia Series 6, Data …   Wikipedia

  • Borland — Infobox Company company name = Borland Software Corporation company company type = Public (nasdaq|BORL) company slogan = The Open ALM Company foundation = California (1983) location = Austin, Texas (previously Cupertino, California) key people =… …   Wikipedia

  • Unique key — In relational database design, a unique key can uniquely identify each row in a table, and is closely related to the Superkey concept. A unique key comprises a single column or a set of columns. No two distinct rows in a table can have the same… …   Wikipedia

  • Database — A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality (for example, the availability of rooms in hotels), in a way that supports… …   Wikipedia

  • Macro (computer science) — A macro (from the Greek μάκρο for long or far) in computer science is a rule or pattern that specifies how a certain input sequence (often a sequence of characters) should be mapped to an output sequence (also often a sequence of characters)… …   Wikipedia

  • Microsoft Access — Microsoft Office Access 2010 running on Windows 7 Developer(s) Microsoft Corporation …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”