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 table is created, each field is given a that says what kind of value it can hold. Choosing the right type makes the data smaller, faster and safer.
| Data type | Holds | Example fields |
|---|---|---|
| Integer | Whole numbers | Age, year of birth, ID number, quantity in stock |
| Real | Numbers with a fractional part | Price, weight, percentage with decimals |
| Text / Alphanumeric | A sequence of characters | Name, address, description |
For each field, ask three short questions in order:
Real. No → keep going.Integer. No → keep going.Boolean. Is it a date or timestamp? Yes → Date/Time. Is it exactly one character (a code or flag)? Yes → Character. Otherwise → Text / Alphanumeric.Two common slips to avoid. Phone numbers and postcodes are stored as text, not integers: they may start with a leading zero, contain spaces or letters, and never have arithmetic done on them. Calendar dates are stored as a Date type, not as text: only a true date field can sort chronologically and reject impossible values like 2024-02-30.
>, <) work on numbers but not on text representations of numbers.| A single character |
Gender code ('M' or 'F'), grade letter |
| Date / Time | A specific calendar date or time | Date of birth, date joined, last-login timestamp |
| Boolean | A simple true/false value | "Has paid?" "Is active?" "Newsletter subscriber?" |