9. Databases
Single-table databases: fields, records, data types, primary keys and SQL queries with SELECT, FROM, WHERE, ORDER BY, SUM and COUNT.
Statometer63CoreNext Paper 294%Everything for this topic — study hub
O Level / IGCSE · 2210 · 0478 · Paper 2
Statometer — what 25 real papers say about this topic and each of its 4 syllabus bullets
Core · #9 of 10 in O Level / IGCSE · recomputed with every new session
A regular, well-paid topic — you cannot afford a gap here.
- Next Paper 2
- 94%
- 9 in 10 chance it is set
- Marks a paper
- 9.1 / 75
- 12% of Paper 2 · fair share 25%
- Appeared in
- 25 / 25
- Paper 2 sittings 2023–2026
- Last set
- May/Jun 2026
- 0478/23 · Q8 · 11 marks · 11-series streak
What the papers say
- Set in 25 of 25 Paper 2 sittings on the current syllabus — treat it as certain.
- Worth about 9.1 marks a paper (12% of Paper 2, well under its fair share of 25%).
- Last set May/Jun 2026 · 0478/23 · Q8 for 11 marks — in the most recent series.
- Set in each of the last 11 series without a miss.
- Steady at around 9.4 marks a paper year on year.
- Lives on “Complete” and “State” — 71% of its questions: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- 42% of its questions involve a diagram, table or figure — practise with pen and paper.
- 75% of its questions are set out as code, pseudocode or a table to complete.
- Most of its marks (91%) come in extended questions of 6+ marks — plan the answer before writing.
- Its biggest question so far: 11 marks (May/Jun 2026 · 0478/23 · Q8).
- Inside the topic, Defining a single-table database from given storage requirements carries the most marks (36%) and Primary keys the least (10%).
- It is examined mostly as AO1 (Knowledge & understanding, 63%), the rest AO2 (26%) — definitions and descriptions in syllabus words score.
- The examiner has commented on 54 of its questions — read “What the examiner said” before you practise.
Command words
Share of questions using the word (a question can use several). What each wants →
Question shapes
- 1–2 mk0
- 3–4 mk4
- 5–6 mk30
- 7–9 mk41
- 10+ mk18
Average 7.9 marks a question · 42% with a figure or table · 75% with code · biggest 11 marks
Assessment objectives — how it is examined
Every part of every current-syllabus question filed under Cambridge's AO1 / AO2 / AO3 (from its command word and what it asks you to do), so you know whether this topic pays for definitions, for applying, or for judging and building.
- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
Paper 2 as a whole
| Paper 2 | Syllabus | Measured |
|---|---|---|
| AO1 Knowledge & understanding | 20% | 27% |
| AO2 Apply to a context | 60% | 51% |
| AO3 Evaluate & judge | 20% | 22% |
Syllabus = Cambridge's grid; measured = the bank's current-syllabus papers.
Inside the topic — every syllabus bullet, measured
Each part of each question is filed under the bullet it examines; the numbers are per Paper 2 sitting, exactly like the topic's. Open a bullet for its own Statometer.
Defining a single-table database from given storage requirements#17 of 19 on Paper 2Occasional · 3155% next paper1.1 marks15/25 sittings→ May/Jun 2026Occasional · 3155%
1.1 · 36% of topic15/25May/Jun 2026latest series · →Rotated in occasionally — the bullet students skip and then meet.Syllabus: fields, records and validation
- Next Paper 2
- 55%
- 6 in 10
- Marks a paper
- 1.1
- 1% of the paper · 36% of the topic
- Asked in
- 15 / 25
- Paper 2 sittings · 74 questions
- Last asked
- May/Jun 2026
- 2210/22 · Q9 · 2 marks · 7-series streak
- Asked in 15 of 25 Paper 2 sittings — about 6 papers in 10.
- About 1.1 marks a paper (1% of Paper 2; 36% of the topic's marks across its 4 bullets).
- Last asked May/Jun 2026 · 2210/22 · Q9 (2 marks) — in the most recent series.
- Asked in each of the last 7 series.
- Usually “Complete” or “State”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- It is examined mostly as AO1 (Knowledge & understanding, 74%) — definitions and descriptions in syllabus words score.
Last 12 sittings→ SteadyAssessment objectives
AO1 74%AO3 16%- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
- Complete61%
- State55%
- Show54%
- Give42%
Basic data types#13 of 19 on Paper 2Regular · 4166% next paper1.6 marks17/25 sittings↗ May/Jun 2026Regular · 4166%
1.6 · 18% of topic17/25May/Jun 2026latest series · ↗Set most sessions for a few marks; know the definition and one example.Syllabus: text/alphanumeric, character, Boolean, integer, real, date/time
- Next Paper 2
- 66%
- 7 in 10
- Marks a paper
- 1.6
- 2% of the paper · 18% of the topic
- Asked in
- 17 / 25
- Paper 2 sittings · 42 questions
- Last asked
- May/Jun 2026
- 0478/23 · Q8 · 4 marks
- Asked in 17 of 25 Paper 2 sittings — about 7 papers in 10.
- About 1.6 marks a paper (2% of Paper 2; 18% of the topic's marks across its 4 bullets).
- Last asked May/Jun 2026 · 0478/23 · Q8 (4 marks) — in the most recent series.
- Rising: 1.3 → 2.1 marks a paper.
- Usually “Complete” or “State”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- Biggest chunk of marks so far: 4 in May/Jun 2026 · 2210/22 · Q9.
- It is examined mostly as AO1 (Knowledge & understanding, 58%), the rest AO2 (29%) — definitions and descriptions in syllabus words score.
Last 12 sittings↗ RisingAssessment objectives
AO1 58%AO2 29%- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
- Complete76%
- State69%
- Show52%
- Give48%
Primary keys#14 of 19 on Paper 2Regular · 4174% next paper1.3 marks20/25 sittings→ May/Jun 2026Regular · 4174%
1.3 · 10% of topic20/25May/Jun 2026latest series · →Set most sessions for a few marks; know the definition and one example.Syllabus: their purpose and identifying a suitable one for a table
- Next Paper 2
- 74%
- 7 in 10
- Marks a paper
- 1.3
- 2% of the paper · 10% of the topic
- Asked in
- 20 / 25
- Paper 2 sittings · 43 questions
- Last asked
- May/Jun 2026
- 0478/23 · Q8 · 2 marks · 3-series streak
- Asked in 20 of 25 Paper 2 sittings — about 8 papers in 10.
- About 1.3 marks a paper (2% of Paper 2; 10% of the topic's marks across its 4 bullets).
- Last asked May/Jun 2026 · 0478/23 · Q8 (2 marks) — in the most recent series.
- Usually “State” or “Complete”: short, precise answers in syllabus words.
- It is examined mostly as AO1 (Knowledge & understanding, 52%), the rest AO3 (48%) — definitions and descriptions in syllabus words score.
Last 12 sittings→ SteadyAssessment objectives
AO1 52%AO3 48%- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
- State79%
- Complete79%
- Give65%
- Show51%
SQL scripts on a single table#5 of 19 on Paper 2Banker · 8294% next paper5.1 marks25/25 sittings↗ May/Jun 2026Banker · 8294%
5.1 · 36% of topic25/25May/Jun 2026latest series · ↗Asked in nearly every paper — the bullet to know cold.Syllabus: SELECT, FROM, WHERE, ORDER BY (ASCENDING/DESCENDING), SUM, COUNT, AND, OR — and working out the output of a query
- Next Paper 2
- 94%
- 9 in 10
- Marks a paper
- 5.1
- 7% of the paper · 36% of the topic
- Asked in
- 25 / 25
- Paper 2 sittings · 75 questions
- Last asked
- May/Jun 2026
- 0478/23 · Q8 · 5 marks · 11-series streak
- Asked in 25 of 25 Paper 2 sittings — nearly every paper.
- About 5.1 marks a paper (7% of Paper 2; 36% of the topic's marks across its 4 bullets).
- Last asked May/Jun 2026 · 0478/23 · Q8 (5 marks) — in the most recent series.
- Asked in each of the last 11 series.
- Rising: 4.5 → 5.4 marks a paper.
- Usually “Complete” or “State”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- Biggest chunk of marks so far: 8 in Feb/Mar 2026 · 0478/22 · Q8.
- It is examined mostly as AO1 (Knowledge & understanding, 64%), the rest AO2 (36%) — definitions and descriptions in syllabus words score.
Last 12 sittings↗ RisingAssessment objectives
AO1 64%AO2 36%- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
- Complete63%
- State59%
- Show45%
- Give41%
7% of the topic's marks sit in question parts that belong to another topic (scenario questions cross sections) or that no bullet claims; they count for the topic, not for a bullet.
Marks a paper, year by year
Grey years are the previous syllabus (2010–2022, 65 questions) — history, not counted in the rates.
By exam series
- Feb/Mar4/4 · 9.8 mk
- May/Jun12/12 · 8.4 mk
- Oct/Nov9/9 · 9.4 mk
What you need to know4syllabus section 9
- Defining a single-table database from given storage requirements — fields, records and validation
- Basic data types — text/alphanumeric, character, Boolean, integer, real, date/time
- Primary keys — their purpose and identifying a suitable one for a table
- SQL scripts on a single table — SELECT, FROM, WHERE, ORDER BY (ASCENDING/DESCENDING), SUM, COUNT, AND, OR — and working out the output of a query
Video lectures9ZAK's YouTube channel · play here
O Level20222.2K views
O Level2022714 views
O Level20201.3K views
O Level20203.5K views
O LevelAS20202.4K views
O LevelASA220202.3K views
Infographics1draw these the way the examiner expects · download as PNG
Single-table database & SQL
Key terms10use these exact words in the exam
Dotted terms are defined in the glossary.
Code help2referenced to the Cambridge pseudocode guide
SELECT Name, MarkFROM STUDENTWHERE Form = "10B" AND Mark > 70ORDER BY Mark DESC;
SELECT SUM(Mark)FROM STUDENTWHERE Form = "10B";SELECT COUNT(*)FROM STUDENTWHERE Mark >= 50;
SQL Lab13runnable queries against the ZAK Academy database
- Run
SELECT * — every column of a table
The simplest query. Look at the STUDENT table first, then pick columns.
O LevelASSELECT & FROM 2210 §9.2 / 9618 §8.3 - Run
Choose the columns you want
Name the fields, separated by commas — the result has only those columns, in that order.
O LevelASSELECT & FROM 2210 §9.2 - Run
WHERE with a text value
Text is written in single quotes. Only rows where the condition is TRUE are returned.
O LevelASWHERE 2210 §9.2 - Run
WHERE with a number and a comparison
Numbers have no quotes. > >= < <= = <> all work.
O LevelASWHERE 2210 §9.2 - Run
AND, OR and brackets
AND binds tighter than OR — use brackets to say what you mean, exactly as in Boolean logic.
O LevelASWHERE 2210 §9.2 - Run
ORDER BY ascending
Alphabetical by last name — ASC is the default.
O LevelASORDER BY 2210 §9.2 - Run
ORDER BY descending, two keys
Highest salary first; ties broken by last name. LIMIT keeps the top few.
O LevelASORDER BY 2210 §9.2 - Run
WHERE then ORDER BY
Filter first, then sort — the clause order is fixed: SELECT … FROM … WHERE … ORDER BY.
O LevelASORDER BY 2210 §9.2 - Run
COUNT(*) — how many rows
How many students are in form 10A? COUNT(*) counts matching rows.
O LevelASCOUNT, SUM, AVG, MIN, MAX 2210 §9.2 - Run
SUM — total of a column
Total monthly salary bill for the Computer Science department.
O LevelASCOUNT, SUM, AVG, MIN, MAX 2210 §9.2 - Run
2210: names and marks of students who scored over 70 in CSO-A, highest first
Single-table query with WHERE, AND and ORDER BY — the classic 2210 Paper 2 SQL question.
O LevelExam-style questions 2210 §9.2 - Run
2210: how many books were published after 2015?
COUNT with a WHERE — the 2210 syllabus expects SUM and COUNT.
O LevelExam-style questions 2210 §9.2 - Run
2210: total copies of books by an author
SUM over a filtered set.
O LevelExam-style questions 2210 §9.2
Database Designer3normalisation questions checked dependency by dependency, ER diagrams and table designs
- Open
Sports club members
Design the table: a member ID, name, date of birth, phone number, membership type and whether the fee is paid.
O LevelSingle-table design (2210) 2210 §9 - Open
Shop stock
Products with a code, description, price, stock level and reorder flag.
O LevelSingle-table design (2210) 2210 §9 - Open
Driving lessons
Lesson records: number, date, instructor, student name, duration and paid — where is the primary key?
O LevelSingle-table design (2210) 2210 §9
Test yourself
Ready to check you know it?
Every round is a fresh random draw, weak cards come back until you get them right, and past-paper questions come with their mark schemes. Marks earn XP on your dashboard.