What is Primary Key?
A column or set of columns that uniquely identifies each row in a database table.
A primary key ensures every row in a table is unique and identifiable. It cannot contain NULL values and must be unique across all rows. Common choices include auto-incrementing integers (SERIAL) or UUIDs.
Primary keys are automatically indexed for fast lookups. Composite primary keys use multiple columns together. Primary keys are referenced by foreign keys in other tables to create relationships.