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 data type 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 |
| Character | 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?" |
Example — A small cars table. Pick a data type for each field.
| Field | Suitable data type | Why |
|---|---|---|
| car_id | Integer | Whole-number primary key |
| make | Text / alphanumeric | A short string of characters |
| model | Text / alphanumeric | Same |
| colour | Text / alphanumeric | Same |
| price | Real | Money values usually have decimal parts |
>, <) work on numbers but not on text representations of numbers.