8. Databases
Relational databases, normalisation to 3NF, ER diagrams, DDL and DML with SQL.
Statometer87BankerNext Paper 195%Everything for this topic — study hub
AS Level · 9618 · Paper 1
Statometer — what 33 real papers say about this topic and each of its 3 syllabus bullets
Banker · #3 of 12 in AS Level · recomputed with every new session
Set in nearly every paper and worth a big slice of it — revise first, expect it.
- Next Paper 1
- 95%
- 9 in 10 chance it is set
- Marks a paper
- 15.8 / 75
- 21% of Paper 1 · fair share 13%
- Appeared in
- 33 / 33
- Paper 1 sittings 2021–2026
- Last set
- May/Jun 2026
- 9618/13 · Q4 · 17 marks · 11-series streak
What the papers say
- Set in 33 of 33 Paper 1 sittings on the current syllabus — treat it as certain.
- Worth about 15.8 marks a paper (21% of Paper 1, 1.7× its fair share).
- Last set May/Jun 2026 · 9618/13 · Q4 for 17 marks — in the most recent series.
- Set in each of the last 11 series without a miss.
- Steady at around 16.4 marks a paper year on year.
- Lives on “Write” and “Complete” — 94% of its questions: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- 51% of its questions involve a diagram, table or figure — practise with pen and paper.
- 74% of its questions are set out as code, pseudocode or a table to complete.
- Most of its marks (79%) come in extended questions of 12+ marks — plan the answer before writing.
- Its biggest question so far: 19 marks (May/Jun 2025 · 9618/12 · Q6).
- Inside the topic, §8.1 Database concepts carries the most marks (44%) and §8.2 Database management systems the least (13%).
- It is examined mostly as AO1 (Knowledge & understanding, 60%), the rest AO2 (41%) — definitions and descriptions in syllabus words score.
- The examiner has commented on 22 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
- ≤ 6 mk0
- 7–9 mk0
- 10–12 mk11
- 13–15 mk8
- 16+ mk16
Average 14.5 marks a question · 51% with a figure or table · 74% with code · biggest 19 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 & analyse
- AO3 Design, program & evaluate
Paper 1 as a whole
| Paper 1 | Syllabus | Measured |
|---|---|---|
| AO1 Knowledge & understanding | 60% | 68% |
| AO2 Apply & analyse | 40% | 32% |
| AO3 Design, program & evaluate | 0% | 0% |
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 1 sitting, exactly like the topic's. Open a bullet for its own Statometer.
8.1Database concepts#2 of 25 on Paper 1Banker · 9195% next paper5.7 marks33/33 sittings→ May/Jun 2026Banker · 9195%
5.7 · 44% of topic33/33May/Jun 2026latest series · →Asked in nearly every paper — the bullet to know cold.Syllabus: limitations of file-based systems; relational terminology (entity, tuple, attribute, keys, relationships, referential integrity); E-R diagrams; normalisation to 1NF, 2NF, 3NF
- Next Paper 1
- 95%
- 9 in 10
- Marks a paper
- 5.7
- 8% of the paper · 44% of the topic
- Asked in
- 33 / 33
- Paper 1 sittings · 33 questions
- Last asked
- May/Jun 2026
- 9618/13 · Q4 · 8 marks · 11-series streak
- Asked in 33 of 33 Paper 1 sittings — nearly every paper.
- About 5.7 marks a paper (8% of Paper 1; 44% of the topic's marks across its 3 bullets).
- Last asked May/Jun 2026 · 9618/13 · Q4 (8 marks) — in the most recent series.
- Asked in each of the last 11 series.
- Usually “Write” or “Complete”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- Biggest chunk of marks so far: 12 in May/Jun 2023 · 9618/13 · Q4.
- It is examined almost entirely as AO1 (Knowledge & understanding, 90%) — definitions and descriptions in syllabus words score.
Last 12 sittings→ SteadyAssessment objectives
AO1 90%- AO1 Knowledge & understanding
- AO2 Apply & analyse
- AO3 Design, program & evaluate
- Write91%
- Complete64%
- Describe55%
- Explain49%
8.2Database management systems#18 of 25 on Paper 1Regular · 4256% next paper1.9 marks19/33 sittings→ May/Jun 2026Regular · 4256%
1.9 · 13% of topic19/33May/Jun 2026latest series · →Set most sessions for a few marks; know the definition and one example.Syllabus: data management and the data dictionary, data modelling, logical schema, data integrity, security and backup; the developer interface and query processor
- Next Paper 1
- 56%
- 6 in 10
- Marks a paper
- 1.9
- 3% of the paper · 13% of the topic
- Asked in
- 19 / 33
- Paper 1 sittings · 19 questions
- Last asked
- May/Jun 2026
- 9618/12 · Q3 · 2.5 marks · 11-series streak
- Asked in 19 of 33 Paper 1 sittings — about 6 papers in 10.
- About 1.9 marks a paper (3% of Paper 1; 13% of the topic's marks across its 3 bullets).
- Last asked May/Jun 2026 · 9618/12 · Q3 (2.5 marks) — in the most recent series.
- Asked in each of the last 11 series.
- Usually “Write” or “Complete”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- Biggest chunk of marks so far: 6 in May/Jun 2025 · 9618/13 · Q6.
- It is examined almost entirely as AO1 (Knowledge & understanding, 93%) — definitions and descriptions in syllabus words score.
Last 12 sittings→ SteadyAssessment objectives
AO1 93%- AO1 Knowledge & understanding
- AO2 Apply & analyse
- AO3 Design, program & evaluate
- Write84%
- Complete63%
- Describe58%
- Explain53%
8.3DDL and DML#1 of 25 on Paper 1Banker · 9290% next paper6.4 marks31/33 sittings↗ May/Jun 2026Banker · 9290%
6.4 · 43% of topic31/33May/Jun 2026latest series · ↗Asked in nearly every paper — the bullet to know cold.Syllabus: SQL as the standard; CREATE DATABASE/TABLE, data types, ALTER TABLE, PRIMARY/FOREIGN KEY; SELECT with WHERE, ORDER BY, GROUP BY, INNER JOIN, SUM, COUNT, AVG; INSERT, DELETE, UPDATE
- Next Paper 1
- 90%
- 9 in 10
- Marks a paper
- 6.4
- 9% of the paper · 43% of the topic
- Asked in
- 31 / 33
- Paper 1 sittings · 31 questions
- Last asked
- May/Jun 2026
- 9618/13 · Q4 · 9 marks · 11-series streak
- Asked in 31 of 33 Paper 1 sittings — nearly every paper.
- About 6.4 marks a paper (9% of Paper 1; 43% of the topic's marks across its 3 bullets).
- Last asked May/Jun 2026 · 9618/13 · Q4 (9 marks) — in the most recent series.
- Asked in each of the last 11 series.
- Rising: 5 → 7.2 marks a paper.
- Usually “Write” or “Complete”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- Biggest chunk of marks so far: 9 in May/Jun 2026 · 9618/11 · Q4.
- It is examined almost entirely as AO2 (Apply & analyse, 89%) — you must apply it to the given data or scenario — work it out, trace it, explain it in context.
Last 12 sittings↗ RisingAssessment objectives
AO2 89%- AO1 Knowledge & understanding
- AO2 Apply & analyse
- AO3 Design, program & evaluate
- Write94%
- Complete65%
- Describe52%
- Explain48%
12% 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
By exam series
- May/Jun18/18 · 16.9 mk
- Oct/Nov15/15 · 13.5 mk
What you need to know3syllabus §8.1, §8.2, §8.3
- 8.1Database concepts — limitations of file-based systems; relational terminology (entity, tuple, attribute, keys, relationships, referential integrity); E-R diagrams; normalisation to 1NF, 2NF, 3NF
- 8.2Database management systems — data management and the data dictionary, data modelling, logical schema, data integrity, security and backup; the developer interface and query processor
- 8.3DDL and DML — SQL as the standard; CREATE DATABASE/TABLE, data types, ALTER TABLE, PRIMARY/FOREIGN KEY; SELECT with WHERE, ORDER BY, GROUP BY, INNER JOIN, SUM, COUNT, AVG; INSERT, DELETE, UPDATE
Video lectures9ZAK's YouTube channel · play here
AS20205.4K views
AS20204.0K views
AS20202.2K views
O LevelAS20202.4K views
O LevelASA220202.3K views
AS9618 Paper 120185.4K views
Infographics4draw these the way the examiner expects · download as PNG
Single-table database & SQL
Entity-relationship diagrams & keys
Normalisation 1NF → 3NF
SQL: DDL vs DML
Key terms14use these exact words in the exam
Dotted terms are defined in the glossary.
Code help2referenced to the Cambridge pseudocode guide
CREATE TABLE CUSTOMER (CustomerID INTEGER PRIMARY KEY,CustomerName VARCHAR(40));CREATE TABLE ORDERS (OrderID INTEGER PRIMARY KEY,CustomerID INTEGER,Qty INTEGER,FOREIGN KEY (CustomerID) REFERENCES CUSTOMER(CustomerID));
INSERT INTO CUSTOMER (CustomerID, CustomerName) VALUES (1, "Ayesha");UPDATE ORDERS SET Qty = Qty + 1 WHERE OrderID = 10;DELETE FROM ORDERS WHERE Qty = 0;SELECT CustomerName, SUM(Qty)FROM CUSTOMER INNER JOIN ORDERS ON CUSTOMER.CustomerID = ORDERS.CustomerIDGROUP BY CustomerNameORDER BY SUM(Qty) DESC;
SQL Lab40runnable 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
DISTINCT — each value once
Which towns do students come from? Without DISTINCT you get one row per student.
ASSELECT & FROM 9618 §8.3 - Run
Calculated column with an alias
Arithmetic in the SELECT list and AS to name the new column — the annual salary from a monthly one.
ASSELECT & FROM 9618 §8.3 - 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
LIKE with wildcards
% matches any characters, _ matches exactly one. Names beginning with A; emails ending in a domain.
ASWHERE 9618 §8.3 - Run
IN and BETWEEN
IN tests a list; BETWEEN is inclusive at both ends. Dates are compared as 'YYYY-MM-DD'.
ASWHERE 9618 §8.3 - Run
IS NULL — missing values
Enrolments without a mark yet. NULL is not 0 and not '' — = NULL never matches; use IS NULL.
ASWHERE 9618 §8.3 - 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
AVG, MIN and MAX together
Statistics for one class. Aliases make the headings readable; NULL marks are ignored.
ASCOUNT, SUM, AVG, MIN, MAX 9618 §8.3 - Run
COUNT(DISTINCT …)
How many different towns — COUNT(Town) would count every student.
ASCOUNT, SUM, AVG, MIN, MAX 9618 §8.3 - Run
INNER JOIN two tables
Which teacher takes each class? Join CLASS to TEACHER on the foreign key.
ASINNER JOIN 9618 §8.3 - Run
Three tables through a link table
Student → ENROLMENT → CLASS: the many-to-many resolved. Aliases (S, E, C) keep it short.
ASINNER JOIN 9618 §8.3 - Run
Four tables — who studies what with whom
STUDENT, ENROLMENT, CLASS, SUBJECT and TEACHER in one query. Notice every ON pairs a foreign key with a primary key.
ASA2INNER JOIN 9618 §8.3 - Run
Join using WHERE (the older style)
Older mark schemes accept the comma join with the condition in WHERE. Same result as INNER JOIN … ON.
ASINNER JOIN 9618 §8.3 - Run
LEFT JOIN — keep rows with no match
Every teacher, even those with no class (their ClassID shows NULL). INNER JOIN would drop them.
A2INNER JOIN 9618 §8.3 (extension) - Run
GROUP BY with COUNT
How many students in each form group — one row per group.
ASGROUP BY & HAVING 9618 §8.3 - Run
GROUP BY across a join
Average mark per class, with the subject title. Everything not inside AVG must be in GROUP BY.
ASGROUP BY & HAVING 9618 §8.3 - Run
HAVING — filter the groups
Departments whose total salary bill is over 200 000. WHERE filters rows before grouping; HAVING filters groups after.
ASGROUP BY & HAVING 9618 §8.3 - Run
Most borrowed books
Join LOAN to BOOK, count loans per title, sort by the count.
ASGROUP BY & HAVING 9618 §8.3 - Run
INSERT INTO — add a row
Values in the same order as the columns you list. Then SELECT to prove it is there.
ASINSERT, UPDATE, DELETE 9618 §8.3 - Run
UPDATE — change values
Set a mark and grade for one enrolment. Without WHERE every row would change!
ASINSERT, UPDATE, DELETE 9618 §8.3 - Run
DELETE FROM — remove rows
Delete a returned loan. Try deleting a STUDENT who has enrolments and see referential integrity refuse.
ASINSERT, UPDATE, DELETE 9618 §8.3 - Run
Referential integrity in action
A foreign key must point at an existing primary key. This INSERT is refused — read the error, then fix the StudentID.
ASINSERT, UPDATE, DELETE 9618 §8.1, §8.3 - Run
UPDATE with a calculation
Give every Mathematics teacher a 10% rise — an expression on the right of SET.
ASINSERT, UPDATE, DELETE 9618 §8.3 - Run
CREATE TABLE with a primary key
DDL: each column has a data type; PRIMARY KEY makes the identifier unique and NOT NULL.
ASCREATE & ALTER TABLE 9618 §8.3 - Run
CREATE TABLE with a foreign key
A child table referencing a parent — the FOREIGN KEY line is what the mark scheme looks for.
ASCREATE & ALTER TABLE 9618 §8.3 - Run
Composite primary key (link table)
Two columns together make the key — the standard way to resolve a many-to-many relationship.
ASCREATE & ALTER TABLE 9618 §8.1, §8.3 - Run
ALTER TABLE — add and drop a column
Add a phone number to TEACHER, then remove it again.
ASCREATE & ALTER TABLE 9618 §8.3 - Run
CREATE DATABASE and the full DDL
The whole thing from the top: a database, a parent table, then a child table with keys.
ASCREATE & ALTER TABLE 9618 §8.3 - Run
9618: students taught by ZAK, alphabetically
Paper 1 §8 style: a query spanning four tables with a WHERE on the teacher's name.
ASExam-style questions 9618 §8.3 - Run
9618: overdue loans with the borrower's email
Loans not returned and due before today — join and a date comparison.
ASExam-style questions 9618 §8.3 - Run
9618: DDL for a new table with keys
Write the CREATE TABLE for an ATTENDANCE table linked to STUDENT and CLASS — composite key and two foreign keys.
ASExam-style questions 9618 §8.3 - Run
9618: average mark per subject, best first, only subjects with 5+ marks
GROUP BY across a join with HAVING and ORDER BY on an aggregate.
ASExam-style questions 9618 §8.3
Database Designer11normalisation questions checked dependency by dependency, ER diagrams and table designs
- Open
Customer orders
The classic: an order form with a repeating group of order lines becomes Customer, Order, OrderLine and Product.
ASNormalisation to 3NF 9618 §8.1 - Open
Students and classes
A timetable table with a transitive dependency (teacher details depend on the teacher, not the class).
ASNormalisation to 3NF 9618 §8.1 - Open
Library loans
Loans with a composite key: the partial dependencies on BookID and MemberID must move out (2NF), then the author details (3NF).
ASNormalisation to 3NF 9618 §8.1 - Open
Hotel bookings
Guests, rooms and bookings — room type details depend on the room type code.
ASNormalisation to 3NF 9618 §8.1 - Open
Airline tickets
A ticket carries passenger, flight and aircraft details — three levels of dependency.
ASNormalisation to 3NF 9618 §8.1 - Open
Invoice — stop at 2NF and see why it fails 3NF
A worked example whose model answer is only in 2NF; the checker names the transitive dependency.
ASNormalisation to 3NF 9618 §8.1 - Open
School: students, classes, teachers
A student is in one class; a class has one teacher; a teacher can teach several classes.
ASEntity–relationship diagrams 9618 §8.2 - Open
Students and courses (many-to-many)
A student takes many courses and a course has many students — the M:M must be resolved with a link entity.
ASEntity–relationship diagrams 9618 §8.2 - Open
Library: books, members, loans
Three entities and two relationships, one of them with attributes of its own (the loan).
ASEntity–relationship diagrams 9618 §8.2 - Open
Hospital: doctors, patients, wards
A ward holds many patients; a patient has one consultant doctor; doctors and patients also meet in appointments (M:M).
ASEntity–relationship diagrams 9618 §8.2 - Open
One-to-one: employee and company car
Each employee has at most one car and each car one driver — and why 1:1 is rare.
ASEntity–relationship diagrams 9618 §8.2
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.