Concept

Superkey

In the relational data model a superkey is a set of attributes that uniquely identifies each tuple of a relation. Because superkey values are unique, tuples with the same superkey value must also have the same non-key attribute values. That is, non-key attributes are functionally dependent on the superkey. The set of all attributes is always a superkey (the trivial superkey). Tuples in a relation are by definition unique, with duplicates removed after each operation, so the set of all attributes is always uniquely valued for every tuple. A candidate key (or minimal superkey) is a superkey that can't be reduced to a simpler superkey by removing an attribute. For example, in an employee schema with attributes employeeID, name, job, and departmentID, if employeeID values are unique then employeeID combined with any or all of the other attributes can uniquely identify tuples in the table. Each combination, {employeeID}, {employeeID, name}, {employeeID, name, job}, and so on is a superkey. {employeeID} is a candidate key, since no subset of its attributes is also a superkey. {employeeID, name, job, departmentID} is the trivial superkey. If attribute set K is a superkey of relation R, then at all times it is the case that the projection of R over K has the same cardinality as R itself. First, list out all the sets of attributes: • {} • {Monarch Name} • {Monarch Number} • {Royal House} • {Monarch Name, Monarch Number} • {Monarch Name, Royal House} • {Monarch Number, Royal House} • {Monarch Name, Monarch Number, Royal House} Second, eliminate all the sets which do not meet superkey's requirement. For example, {Monarch Name, Royal House} cannot be a superkey because for the same attribute values (Edward, Plantagenet), there are two distinct tuples: (Edward, II, Plantagenet) (Edward, III, Plantagenet) Finally, after elimination, the remaining sets of attributes are the only possible superkeys in this example: {Monarch Name, Monarch Number} — this is also the candidate key {Monarch Name, Monarch Number, Royal House} In reality, superkeys cannot be determined simply by examining one set of tuples in a relation.

About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.
Related lectures (9)
Factorisation in PIDs
Covers factorisation in PIDs, prime ideals, unique tuples, and common prime factors.
Privacy-preserving data publishing: Challenges and Solutions
Explores challenges in privacy-preserving data publishing, including k-anonymity and synthetic data solutions.
Relational Algebra and SQL: Foundations of Database Management
Introduces the relational model and relational algebra, focusing on SQL and its operations for effective database management.
Show more
Related publications (1)

Application of a Low Frequency, Low Power Radio Frequency Positioning System for Real Time Indoor Positioning

Yves Perriard, Alexis Boegli, Pooneh Mohaghegh

This paper focuses on the design and application of low power and low-frequency localization system using received signal strength indication (RSSI). The receiver will wake up from sleeping mode by a modulated magnetic field emitted from a transmitter modu ...
2020
Related concepts (6)
Candidate key
A candidate key, or simply a key, of a relational database is a minimal superkey. In other words, it is any set of columns that have a unique combination of values in each row (which makes it a superkey), with the additional constraint that removing any column could produce duplicate combinations of values (which makes it a minimal superkey). Because a candidate key is a superkey that doesn't contain a smaller one, a relation can have multiple candidate keys, each with a different number of attributes.
Foreign key
A foreign key is a set of attributes in a table that refers to the primary key of another table. The foreign key links these two tables. Another way to put it: In the context of relational databases, a foreign key is a set of attributes subject to a certain kind of inclusion dependency constraints, specifically a constraint that the tuples consisting of the foreign key attributes in one relation, R, must also exist in some other (not necessarily distinct) relation, S, and furthermore that those attributes must also be a candidate key in S.
Primary key
In the relational model of databases, a primary key is a specific choice of a minimal set of attributes (columns) that uniquely specify a tuple (row) in a relation (table). Informally, a primary key is "which attributes identify a record," and in simple cases constitute a single attribute: a unique ID. More formally, a primary key is a choice of candidate key (a minimal superkey); any other candidate key is an alternate key.
Show more

Graph Chatbot

Chat with Graph Search

Ask any question about EPFL courses, lectures, exercises, research, news, etc. or try the example questions below.

DISCLAIMER: The Graph Chatbot is not programmed to provide explicit or categorical answers to your questions. Rather, it transforms your questions into API requests that are distributed across the various IT services officially administered by EPFL. Its purpose is solely to collect and recommend relevant references to content that you can explore to help you answer your questions.