encyclopegia.org

Superkey

In the relational data model, a superkey is any 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.

In the relational data model, a superkey is any 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. ==Example== 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} — this is also the trivial superkey. In reality, superkeys cannot be determined simply by examining one set of tuples in a relation. A superkey defines a functional dependency constraint of a relation schema which must hold for all possible instance relations of that relation schema. ==See also== Alternate key Candidate key Compound key Foreign key Primary key ==References== ==Further reading== ==External links== Relation Database terms of reference, Keys: An overview of the different types of keys in an RDBMS

References

  1. Codd's First Relational Papers: A Critical Analysis · retrieved 2020-01-03 · rev 1319884215
    Cite this reference

    MLA "Codd's First Relational Papers: A Critical Analysis." Date, Christopher (2015). 2020-01-03. https://www.dcs.warwick.ac.uk/~hugh/TTM/CJD-on-EFC's-First-Two-Papers.pdf. Accessed 24 November 2026.

    Chicago "Codd's First Relational Papers: A Critical Analysis." Date, Christopher (2015). 2020-01-03. https://www.dcs.warwick.ac.uk/~hugh/TTM/CJD-on-EFC's-First-Two-Papers.pdf.

    APA Date, Christopher (2015). (2020). Codd's First Relational Papers: A Critical Analysis. Retrieved November 24, 2026, from https://www.dcs.warwick.ac.uk/~hugh/TTM/CJD-on-EFC's-First-Two-Papers.pdf

  2. Introduction to Database Management Systems . Tata McGraw-Hill. 2005. p. 77. ISBN 9780070591196 . no two tuples in any legal relation Wikipedia revision 1319884215, retrieved 2026-11-22 · retrieved 2026-11-21 · rev 1319884215
    Cite this reference

    MLA "Introduction to Database Management Systems . Tata McGraw-Hill. 2005. p. 77. ISBN 9780070591196 . no two tuples in any legal relation Wikipedia revision 1319884215, retrieved 2026-11-22." Introduction to Database Management Systems. 2026-11-21. https://en.wikipedia.org/wiki/ISBN_(identifier). Accessed 24 November 2026.

    Chicago "Introduction to Database Management Systems . Tata McGraw-Hill. 2005. p. 77. ISBN 9780070591196 . no two tuples in any legal relation Wikipedia revision 1319884215, retrieved 2026-11-22." Introduction to Database Management Systems. 2026-11-21. https://en.wikipedia.org/wiki/ISBN_(identifier).

    APA Introduction to Database Management Systems. (2026). Introduction to Database Management Systems . Tata McGraw-Hill. 2005. p. 77. ISBN 9780070591196 . no two tuples in any legal relation Wikipedia revision 1319884215, retrieved 2026-11-22. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/ISBN_(identifier)

  3. An Efficient Algorithm to Compute the Candidate Keys of a Relational Database Schema · retrieved 2026-11-21 · rev 1319884215
    Cite this reference

    MLA "An Efficient Algorithm to Compute the Candidate Keys of a Relational Database Schema." Saiedian, H. 2026-11-21. https://academic.oup.com/comjnl/article-lookup/doi/10.1093/comjnl/39.2.124. Accessed 24 November 2026.

    Chicago "An Efficient Algorithm to Compute the Candidate Keys of a Relational Database Schema." Saiedian, H. 2026-11-21. https://academic.oup.com/comjnl/article-lookup/doi/10.1093/comjnl/39.2.124.

    APA Saiedian, H. (2026). An Efficient Algorithm to Compute the Candidate Keys of a Relational Database Schema. Retrieved November 24, 2026, from https://academic.oup.com/comjnl/article-lookup/doi/10.1093/comjnl/39.2.124

  4. Date, Christopher. Codd's First Relational Papers: A Critical Analysis . w . 2015. · retrieved 2025-10-31 · rev 1319884215
    Cite this reference

    MLA "Date, Christopher. Codd's First Relational Papers: A Critical Analysis . w . 2015." Date, Christopher. 2025-10-31. https://en.wikipedia.org/w/index.php?oldid=1319884215. Accessed 24 November 2026.

    Chicago "Date, Christopher. Codd's First Relational Papers: A Critical Analysis . w . 2015." Date, Christopher. 2025-10-31. https://en.wikipedia.org/w/index.php?oldid=1319884215.

    APA Date, Christopher. (2025). Date, Christopher. Codd's First Relational Papers: A Critical Analysis . w . 2015. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1319884215

  5. An Efficient Algorithm to Compute the Candidate Keys of a Relational Database Schema . · retrieved 2025-10-31 · rev 1319884215
    Cite this reference

    MLA "An Efficient Algorithm to Compute the Candidate Keys of a Relational Database Schema ." 2025-10-31. https://en.wikipedia.org/w/index.php?oldid=1319884215. Accessed 24 November 2026.

    Chicago "An Efficient Algorithm to Compute the Candidate Keys of a Relational Database Schema ." 2025-10-31. https://en.wikipedia.org/w/index.php?oldid=1319884215.

    APA encyclopegia.org. (2025). An Efficient Algorithm to Compute the Candidate Keys of a Relational Database Schema . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1319884215

Cite this article

MLA

"Superkey." encyclopegia.org, 2025, https://encyclopegia.org/wiki/superkey. Accessed 24 November 2026.

Chicago

"Superkey." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/superkey.

APA

encyclopegia.org. (2025). Superkey. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/superkey

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1319884215 · 0.5 · snapshot enwiki-001319884215

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.