Information about Superkey
This article is about the programming term. For the keyboard button, see Super key (keyboard button).
A superkey is defined in the relational model of database organisation 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
| Monarch Name | Monarch Number | Royal House |
|---|---|---|
| Edward | II | Plantagenet |
| Edward | III | Plantagenet |
| Richard | II | Plantagenet |
| Henry | IV | Lancaster |
In this example, the possible superkeys are:
- {Monarch Name, Monarch Number}
- {Monarch Name, Monarch Number, Royal House}
See also
Topics in database management systems (DBMS)
| |
|---|---|
|
Concepts Database Database models Database storage Relational model Distributed DBMS ACID Null Relational database Relational algebra Relational calculus Database normalization Referential integrity Relational DBMS Primary key, Foreign key, Surrogate key, Superkey, Candidate key | |
|
Objects Trigger View Table Cursor Log Transaction Index Stored procedure Partition |
Topics in SQL Select Insert Update Merge Delete Join Union Create Drop Begin work Commit Rollback Truncate Alter |
| Implementations of database management systems | |
|
Types of implementations Relational Flat file Deductive Dimensional Hierarchical Object oriented Object relational Temporal XML data stores | |
|
Database products Object-oriented (comparison) Relational (comparison) |
Components Query language Query optimizer Query plan ODBC JDBC |
The Super key was a special key on the Space-cadet keyboard; today, it is typically identified with the Windows key or Apple logo, although these may also be identified with the Meta key.
..... Click the link for more information.
..... Click the link for more information.
The relational model for database management is a database model based on predicate logic and set theory. It was first formulated and proposed in 1969 by Edgar Codd with aims that included avoiding, without loss of completeness, the need to write computer programs to
..... Click the link for more information.
..... Click the link for more information.
database is a structured collection of records or data that is stored in a computer system so that a computer program or person using a query language can consult it to answer queries. The records retrieved in answer to queries are information that can be used to make decisions.
..... Click the link for more information.
..... Click the link for more information.
SET may stand for:
..... Click the link for more information.
- Sanlih Entertainment Television, a television channel in Taiwan
- Secure electronic transaction, a protocol used for credit card processing,
..... Click the link for more information.
In relational databases, a relvar is an abbreviation for "relation variable". The term is used in the well-known database textbook by C.J. Date to differentiate between a variable that contains a relation and the relation itself.
..... Click the link for more information.
..... Click the link for more information.
For the musical term, see .
In mathematics, a tuple is a finite sequence (also known as an "ordered list") of objects, each of a specified type. A tuple containing n objects is known as an "n-tuple".
..... Click the link for more information.
A functional dependency (FD) is a constraint between two sets of attributes in a relation from a database.
Given a relation R, a set of attributes X in R is said to functionally determine another attribute Y, also in R
..... Click the link for more information.
Given a relation R, a set of attributes X in R is said to functionally determine another attribute Y, also in R
..... Click the link for more information.
projection is a unary operation written as where is a set of attribute names. The result of such projection is defined as the set that is obtained when all tuples in are restricted to the set .
..... Click the link for more information.
..... Click the link for more information.
In mathematics, the cardinality of a set is a measure of the "number of elements of the set". There are two approaches to cardinality – one which compares sets directly using bijections and injections, and another which uses cardinal numbers.
..... Click the link for more information.
..... Click the link for more information.
In the relational model, a candidate key of a relvar (relation variable) is a set of attributes of that relvar such that
..... Click the link for more information.
- (1) at all times it holds in the relation assigned to that variable that there are no two distinct tuples with the same values for these attributes and
..... Click the link for more information.
In the relational model, a candidate key of a relvar (relation variable) is a set of attributes of that relvar such that
..... Click the link for more information.
- (1) at all times it holds in the relation assigned to that variable that there are no two distinct tuples with the same values for these attributes and
..... Click the link for more information.
In database design, a compound key (also called a composite key or concatenated key) is a key that consists of 2 or more attributes.
No restriction is applied to the attributes regarding their (initial) ownership within the data model.
..... Click the link for more information.
No restriction is applied to the attributes regarding their (initial) ownership within the data model.
..... Click the link for more information.
In the relational model, a candidate key of a relvar (relation variable) is a set of attributes of that relvar such that
..... Click the link for more information.
- (1) at all times it holds in the relation assigned to that variable that there are no two distinct tuples with the same values for these attributes and
..... Click the link for more information.
In relational database design, a unique key or primary key is a candidate key to uniquely identify each row in a table. A unique key or primary key comprises a single column or set of columns.
..... Click the link for more information.
..... Click the link for more information.
An alternate key (or secondary key) is any candidate key which is not selected to be the primary key (PK).
For example, a relational database with a table "employee" could have attributes like "employee_id", "bank_acct_no", and so on.
..... Click the link for more information.
For example, a relational database with a table "employee" could have attributes like "employee_id", "bank_acct_no", and so on.
..... Click the link for more information.
In the context of relational databases, a foreign key is a referential constraint between two tables.[1] The foreign key identifies a column or a set of columns in one (referencing) table that refers to a column or set of columns in another (referenced) table.
..... Click the link for more information.
..... Click the link for more information.
A database management system (DBMS) is computer software designed for the purpose of managing databases. Typical examples of DBMSs include Oracle, DB2, Microsoft Access, Microsoft SQL Server, PostgreSQL, MySQL, FileMaker and Sybase Adaptive Server Enterprise.
..... Click the link for more information.
..... Click the link for more information.
database is a structured collection of records or data that is stored in a computer system so that a computer program or person using a query language can consult it to answer queries. The records retrieved in answer to queries are information that can be used to make decisions.
..... Click the link for more information.
..... Click the link for more information.
A data model is not just a way of structuring data: it also defines a set of operations that can be performed on the data. The relational model, for example, defines operations such as select, project, and join.
..... Click the link for more information.
..... Click the link for more information.
flat file database describes any of various means to encode a data model (most commonly a table) as a plain text file.
..... Click the link for more information.
Unordered
Unordered storage typically stores the records in the order they are inserted, while having..... Click the link for more information.
The relational model for database management is a database model based on predicate logic and set theory. It was first formulated and proposed in 1969 by Edgar Codd with aims that included avoiding, without loss of completeness, the need to write computer programs to
..... Click the link for more information.
..... Click the link for more information.
A distributed database management system is a software system that permits the management of a distributed database and makes the distribution transparent to the users. A distributed database is a collection of multiple, logically interrelated databases distributed over a computer network.
..... Click the link for more information.
..... Click the link for more information.
ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably. In the context of databases, a single logical operation on the data is called a transaction.
..... Click the link for more information.
..... Click the link for more information.
Null is a special marker used to indicate that a data value is unknown in the Structured Query Language (SQL). Introduced by the creator of the relational database model, Dr. E.F.
..... Click the link for more information.
..... Click the link for more information.
A relational database is a database that conforms to the relational model, and refers to a database's data and schema (the database's structure of how that data is arranged).
..... Click the link for more information.
..... Click the link for more information.
Relational algebra, an offshoot of first-order logic, is a set of relations closed under operators. Operators operate on one or more relations to yield a relation. Relational algebra is a part of computer science.
..... Click the link for more information.
..... Click the link for more information.
The relational calculus refers to the two calculi, the tuple relational calculus and the domain relational calculus, that are part of the relational model for databases and that provide a declarative way to specify database queries.
..... Click the link for more information.
..... Click the link for more information.
Database normalization is a technique for designing relational database tables to minimize duplication of information and, in so doing, to safeguard the database against certain types of logical or structural problems, namely data anomalies.
..... Click the link for more information.
..... Click the link for more information.
referential integrity. In this example, there is a foreign key (artist_id) value in the album table that references a non-existent artist — in other words there is a foreign key value with no corresponding primary key value in the referenced table.
..... Click the link for more information.
..... Click the link for more information.
A relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model as introduced by E. F. Codd. Relational databases are the most common kind of database in use today (assuming one does not count a file system as a database).
..... Click the link for more information.
..... Click the link for more information.
This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus