Databases · 5 question types
Past paper frequency (2018 to 2024)
This topic accounts for approximately 4% of your exam marks.
SQL SELECT queries and database structure (tables, fields, records) appear as 4 to 6 mark questions.
When a field is defined, validation rules can be attached so that bad data is rejected before it ever reaches the table.
| Validation type | What it checks |
|---|---|
| Length check | The number of characters entered (e.g. phone number = 11 digits) |
| Format check | The pattern of the input (e.g. a product code must be two letters then five digits) |
| Range check | The value is between a minimum and maximum (e.g. age 0-120) |
| Presence check | The field is not left blank |
| Type check | The value matches the field's data type (e.g. only dates in a date field) |
| Check digit | An algorithm-derived final digit confirms the rest of the number was entered correctly (topic 5) |
Validation at the database level is a safety net: even if the application code forgets to check, the database itself will reject bad data.