A brief note on database tables and keys: records, fields, the six data types, the primary key and the validation checks, with a worked example, practice, a program and questions to check yourself.
Data types. Text, text, date/time, integer, Boolean.
Primary key.LessonID, because two lessons can be on the same day.
Validation.Places: type and range check. Day: presence check.
Practice with new numbers
A program to try
The program builds a table with a primary key, then shows that SQLite refuses a record whose key is already used.
Mistakes to avoid
Record and field mixed up. A record is a row, a field is a column.
Phone numbers as integers. They lose the first 0.
A name as the key. Names repeat.
Validation as proof. A sensible value can still be wrong.
Check yourself
A table has 6 fields and 11 records. How many data items does it hold?
Which data type suits a field IsMember?
Which check rejects an empty Surname?
Why is Town a poor primary key?
A range check accepts whole numbers from 3 to 8. Which four test values check both ends?
Sources
Cambridge International, IGCSE Computer Science 0478 syllabus (exams in 2026, 2027 and 2028), section 9 Databases, and the validation checks of section 7.5.