Skip to main content

Key

  • Reference work entry
  • First Online:
Encyclopedia of Database Systems
  • 22 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}\quad \mathrm{Name}\quad \mathrm{Address}\right)} {\begin{array}{l} 11111\qquad \qquad \mathrm{Pat}\qquad 12\ \mathrm{Maple}\\ {}22222\qquad \qquad \mathrm{Tracy}\qquad 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)...

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 4,499.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 6,499.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

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

© 2018 Springer Science+Business Media, LLC, part of Springer Nature

About this entry

Check for updates. Verify currency and authenticity via CrossMark

Cite this entry

Embley, D.W. (2018). Key. In: Liu, L., Özsu, M.T. (eds) Encyclopedia of Database Systems. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-8265-9_811

Download citation

Publish with us

Policies and ethics