What is information about data called?
A primary key is a unique identifier for a record in a database table.
Imagine a table of students. Each student has a unique student ID number. This student ID would be the primary key because it uniquely identifies each student record.
Key characteristics of a primary key:
Unique: No two records can have the same primary key value.
Not Null: Every record must have a primary key value.
Minimal: It should contain only the necessary columns to uniquely identify a record.
Purpose:
To efficiently locate specific records.
To establish relationships between tables (foreign keys).
To maintain data integrity.
By using primary keys, a database system can quickly find, update, or delete specific records without confusion or errors.