A unique identifier for each record in a database table, ensuring no two rows are the same.

Every table in a relational database needs a way to uniquely identify each row. The primary key is that identifier — a column or combination of columns whose value is unique across all rows and never null. It is the anchor that other tables use to reference records in this table.

Example: A dataset of Canadian postal codes uses the postal code itself (e.g., K1A 0A9) as the primary key. No two rows share the same postal code, so it uniquely identifies each record.

Primary keys are essential for data integrity. They prevent duplicate records and enable reliable joins between tables. When you download a dataset, the primary key field is often the safest column to use as a unique row identifier.

Related Terms

Learn More

← Back to Glossary Français →