{
  "id": "enwiki-001319884215",
  "slug": "superkey",
  "title": "Superkey",
  "qid": "",
  "lead": "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.",
  "body": "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} &nbsp; • {Monarch Number} &nbsp; • {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",
  "categories": [
    "20351041",
    "20483874",
    "23603337",
    "26220375"
  ],
  "license": "CC BY-SA 4.0",
  "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1319884215",
  "content_hash": "",
  "created_at": null,
  "updated_at": 1762001317.0,
  "claims": [],
  "contradictions": [],
  "confidence": 0.6,
  "csl": {
    "id": "enwiki-001319884215",
    "type": "webpage",
    "title": "Superkey",
    "author": [
      {
        "family": "Anticloud FZ LLE",
        "literal": "Anticloud FZ LLE"
      }
    ],
    "container-title": "encyclopegia.org",
    "publisher": "Anticloud FZ LLE",
    "publisher-place": "Dubai, United Arab Emirates",
    "URL": "https://encyclopegia.org/a/superkey",
    "issued": {
      "date-parts": [
        [
          2026,
          11,
          22
        ]
      ]
    },
    "accessed": {
      "date-parts": [
        [
          2026,
          11,
          22
        ]
      ]
    },
    "license": "CC BY-SA 4.0",
    "DOI": "eo1:enwiki-001319884215",
    "isBasedOn": "https://en.wikipedia.org/w/index.php?oldid=1319884215",
    "note": "Immutable snapshot enwiki-001319884215"
  }
}