Keys
A key is a column or group of columns that uniquely identifies each row in a table.
Keys have the following functions in a database:
- Data Integrity - Enforces uniqueness and prevents duplicates.
- Relationships - Connects data across tables.
- Indexing - Accelerates query performance and data retrieval.
There are several different types of keys: