Databases
Primary key
A column or set of columns that uniquely identifies every row in a table, enforced by a unique index and a NOT NULL constraint.
The choice of primary key affects storage layout (clustered index in SQL Server and MySQL InnoDB), join performance, and replication. Natural keys (like email) carry meaning but can change; surrogate keys (like a serial integer or UUID) are stable but require a join to reach the business value. UUIDs avoid coordination between nodes but fragment B-tree indexes because they are not sequential.