9. Databases
Single-table databases: fields, records, data types, primary keys and SQL queries with SELECT, FROM, WHERE, ORDER BY, SUM and COUNT.
In the 2029–31 syllabus this is Topic 11 and grows to two-table databases with foreign keys, INNER JOIN and INSERT INTO. What changes in 2029 → · Study the new topic: 11. Databases and Structured Query Language (SQL)
Statometer63CoreNext Paper 294%Everything for this topic — study hub
O Level / IGCSE · 2210 · 0478 · Paper 2
This topic is rows 32–35 of the study route.Open it on your study route
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.4 / 75
- 13% 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.4 marks a paper (13% 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.5 marks a paper year on year.
- Lives on “Complete” and “State” — 68% of its questions: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- 40% of its questions involve a diagram, table or figure — practise with pen and paper.
- 69% of its questions are set out as code, pseudocode or a table to complete.
- Most of its marks (89%) 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 (39%) and Primary keys the least (9%).
- It is examined mostly as AO1 (Knowledge & understanding, 65%), the rest AO2 (25%) — definitions and descriptions in syllabus words score.
- The examiner has commented on 68 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 mk1
- 3–4 mk11
- 5–6 mk31
- 7–9 mk46
- 10+ mk20
Average 7.3 marks a question · 40% with a figure or table · 69% 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 · 3355% next paper1.2 marks15/25 sittings→ May/Jun 2026Occasional · 3355%
1.2 · 39% 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.2
- 2% of the paper · 39% of the topic
- Asked in
- 15 / 25
- Paper 2 sittings · 81 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.2 marks a paper (2% of Paper 2; 39% 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, 75%) — definitions and descriptions in syllabus words score.
Last 12 sittings→ SteadyAssessment objectives
AO1 75%AO3 16%- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
- Complete61%
- State56%
- Show54%
- Give44%
Basic data types#13 of 19 on Paper 2Regular · 4674% next paper1.9 marks19/25 sittings→ May/Jun 2026Regular · 4674%
1.9 · 22% of topic19/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
- 74%
- 7 in 10
- Marks a paper
- 1.9
- 3% of the paper · 22% of the topic
- Asked in
- 19 / 25
- Paper 2 sittings · 56 questions
- Last asked
- May/Jun 2026
- 0478/23 · Q8 · 4 marks
- Asked in 19 of 25 Paper 2 sittings — about 8 papers in 10.
- About 1.9 marks a paper (3% of Paper 2; 22% of the topic's marks across its 4 bullets).
- Last asked May/Jun 2026 · 0478/23 · Q8 (4 marks) — in the most recent series.
- Usually “State” or “Complete”: short, precise answers in syllabus words.
- Biggest chunk of marks so far: 4 in May/Jun 2026 · 2210/22 · Q9.
- It is examined mostly as AO1 (Knowledge & understanding, 66%), the rest AO2 (23%) — definitions and descriptions in syllabus words score.
Last 12 sittings→ SteadyAssessment objectives
AO1 66%AO2 23%- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
- State63%
- Complete61%
- Give45%
- Show43%
Primary keys#14 of 19 on Paper 2Regular · 4174% next paper1.3 marks20/25 sittings→ May/Jun 2026Regular · 4174%
1.3 · 9% 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 · 9% of the topic
- Asked in
- 20 / 25
- Paper 2 sittings · 45 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; 9% 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, 53%), the rest AO3 (47%) — definitions and descriptions in syllabus words score.
Last 12 sittings→ SteadyAssessment objectives
AO1 53%AO3 47%- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
- State80%
- Complete80%
- Give67%
- Show53%
SQL scripts on a single table#4 of 19 on Paper 2Banker · 8294% next paper5.1 marks25/25 sittings↗ May/Jun 2026Banker · 8294%
5.1 · 31% 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 · 31% of the topic
- Asked in
- 25 / 25
- Paper 2 sittings · 72 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; 31% 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%
- State61%
- Give46%
- Show44%
6% 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, 78 questions) — history, not counted in the rates.
By exam series
- Feb/Mar4/4 · 9.8 mk
- May/Jun12/12 · 8.8 mk
- Oct/Nov9/9 · 10 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.3K views
O Level2022718 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.
- Run
Choose the columns you want
Name the fields, separated by commas — the result has only those columns, in that order.
- Run
WHERE with a text value
Text is written in single quotes. Only rows where the condition is TRUE are returned.
- Run
WHERE with a number and a comparison
Numbers have no quotes. > >= < <= = <> all work.
- Run
AND, OR and brackets
AND binds tighter than OR — use brackets to say what you mean, exactly as in Boolean logic.
- Run
ORDER BY ascending
Alphabetical by last name — ASC is the default.
- Run
ORDER BY descending, two keys
Highest salary first; ties broken by last name. LIMIT keeps the top few.
- Run
WHERE then ORDER BY
Filter first, then sort — the clause order is fixed: SELECT … FROM … WHERE … ORDER BY.
- Run
COUNT(*) — how many rows
How many students are in form 10A? COUNT(*) counts matching rows.
- Run
SUM — total of a column
Total monthly salary bill for the Computer Science department.
- 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.
- Run
2210: how many books were published after 2015?
COUNT with a WHERE — the 2210 syllabus expects SUM and COUNT.
- Run
2210: total copies of books by an author
SUM over a filtered set.
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.
- Open
Shop stock
Products with a code, description, price, stock level and reorder flag.
- Open
Driving lessons
Lesson records: number, date, instructor, student name, duration and paid — where is the primary key?
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.
NewCS Games · 16 to play
Revise this topic by playing
Quiz battles, a daily CS word, SQL whodunnits, logic-gate puzzles and arcade — every game drills the syllabus. Solo against AskZ bots, with friends, or with your whole class. Free, no sign-up.


