Skip to main content

Key

  • Living reference work entry
  • First Online:
Encyclopedia of Database Systems
  • 42 Accesses

Synonyms

Uniqueness constraint

Definition

In the relational model, a key for a relational schema is a set of attributes whose value(s) uniquely identify a tuple in a valid instance of the relation. Said another way, key value(s) appear at most once in a relation. Often the set of attributes constituting a key is a set with a single attribute. For example, in the relation

$$ \mathrm{Customer} \frac{\left(\mathrm{Customer} \mathrm{ID} \mathrm{Name} \mathrm{Address}\right)} {\begin{array}{l} 11111 \mathrm{Pat} 12\ \mathrm{Maple}\\ {}22222 \mathrm{Tracy} 44\ \mathrm{Elm} \end{array}} $$

the singleton set consisting of just CustomerID is a key and so is the set consisting of the pair of attributes (Name, Address). The values of CustomerID (here, 11111 and 22222) each uniquely identify a tuple. In any valid instance for this relation, no CustomerID value may appear twice. Similarly, the pair (Name, Address) is a key. Pairs of (Name, Address) values (e.g., <Pat, 12 Maple>) uniquely identify...

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to David W. Embley .

Editor information

Editors and Affiliations

Section Editor information

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer Science+Business Media LLC

About this entry

Cite this entry

Embley, D.W. (2017). Key. In: Liu, L., Özsu, M. (eds) Encyclopedia of Database Systems. Springer, New York, NY. https://doi.org/10.1007/978-1-4899-7993-3_811-2

Download citation

  • DOI: https://doi.org/10.1007/978-1-4899-7993-3_811-2

  • Received:

  • Accepted:

  • Published:

  • Publisher Name: Springer, New York, NY

  • Print ISBN: 978-1-4899-7993-3

  • Online ISBN: 978-1-4899-7993-3

  • eBook Packages: Springer Reference Computer SciencesReference Module Computer Science and Engineering

Publish with us

Policies and ethics