Junior — Middle
What are the two elements that form the primary key in a database?
sobes.tech AI
Answer from AI
A primary key in a database is formed from two main elements:
- Uniqueness — a value or set of values that uniquely identify each record in the table.
- Immutability — the primary key values should not change after the record is created.
Most often, the primary key consists of a single column (e.g., ID), but it can be composite, combining two or more columns to ensure uniqueness.