9.1.6 Primary Keys
A Primary Key is a field in database which uniquely identifies each record.
- • Ensures no two records have the same value in that field
Examples:
- • Student ID in a school database
- • ISBN for books in a library database
- • Patient Number in a hospital system
Key Points: A single database table contains one primary key. Each table consists of many records. Every record has the same number of fields. Every field is given a data type. Examples of data types are text, char, and Boolean. Some fields will have validation rules.
Database Structure Summary
A single database table contains one primary key. Each table consists of many records. Every record has the same number of fields. Every field is given a data type. Examples of data types are text, char, and Boolean. Some fields will have validation rules.