database key
A column, or set of columns, whose values identify rows or link them to rows in another table.
In more detail
A primary key identifies each row of its own table; a foreign key holds another table's key to point at a row there. Keys are what let a relational database store each fact once and join facts back together.
Related terms
- primary key — The column, or columns, whose value uniquely identifies each row of a table and can never be NULL.
- foreign key — A column holding another table's primary key value, which the database guarantees points at a row that exists.
- composite key — A key made of two or more columns together, such as order and product on an order line.
Taught in
- Why Tables And Relations Beat Files — PostgreSQL, Indexing & Relational Data Modeling
- Keys, Constraints And Referential Integrity — PostgreSQL, Indexing & Relational Data Modeling