Database Concepts
Databases · 5 question types
Exam Frequency Analysis
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 |
| 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?" |
Choosing the right type
For each field, ask three short questions in order:
- Does it ever need decimals? Yes →
Real. No → keep going. - Is it a count or whole-number ID? Yes →
Integer. No → keep going. - Is it just true or false? Yes →
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.
Why the right data type matters
- Memory efficiency: an integer takes less space than the same number stored as text.
- Faster searching: numeric comparisons (
>,<) work on numbers but not on text representations of numbers. - Validation: a date field rejects a value like "purple" automatically.
- Sorting: a properly-typed date field sorts chronologically; the same date as text would sort alphabetically.