Skip to content

Key

  • A key is something which is used to identify an index in a table
  • Superkey - \(K\) is called a superkey of \(R\) if it is sufficient to identify each possible relation \(r(R)\)
  • Candidate Key - \(K\) is called a minimal / candidate superkey of \(R\) if it is a superkey of minimal cardinality
  • Primary Key - The primary key \(P\) is an arbitrarily chosen candidate key
  • Foreign Key - A foreign key in one table is the primary key in another table
    • A foreign key must appear in either a referencing relation, or a referenced relation