๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

Databases Beginner

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.

Related Terms

ACID
A set of four properties (Atomicity, Consistency, Isolation, Durability) that guarantee reliable database transactions.
Database Sharding
A horizontal scaling strategy that distributes data across multiple database servers based on a partition key.
B-Tree Index
The default index type in most databases that organizes data in a balanced tree structure for efficient searching, sorting, and range queries.
JOIN
An SQL operation that combines rows from two or more tables based on a related column between them.
Graph Database
A database that uses graph structures with nodes, edges, and properties to store and query highly connected data.
Foreign Key
A column that creates a link between two tables by referencing the primary key of another table.
View All Databases Terms โ†’