notes src database-key.md
467 B · 12 lines
Markdown
at main

Key (Relational Database) #

A key of a @[relation][database-relation] in a @[relational database][] is any column (or set of multiple columns) which can be used to uniquely identify a row from any other.

In a well formed database, every relation should have exactly one @[primary key][], but may in fact have many other keys, whether explicitly identified or not.

Other types of keys include:

  • @[Foreign key][]
  • @[Surrogate key][]
  • @[Composite key][]