Practice Questions
A Level Computer Science: Databases — Practice Questions (Cambridge 9618)
Original exam-style practice questions with full worked answers on primary, candidate and foreign keys, referential integrity, normalisation and SQL for Cambridge AS & A Level Computer Science (9618) Topic 8.
- Subject
- Computer Science
- Level
- AS LEVEL
- Topic
- Databases
- Author
- Marlbridge Academic Team
- Updated
- Reviewed by
- Harris Khan (what this means)
Aligned to Cambridge A Level Computer Science (9618), 2027-2029. Official specification .
Syllabus page (what it covers and how it is assessed): Cambridge A Level Computer Science.
Syllabus points this page covers
9618 (AS Level)
- 8 Databases (whole topic)
Found an error? Report a correction.
Need help with this topic? Request a free trial class for A Level Computer Science (9618).
These are original questions written for Marlbridge, for revision and practice on this content. They are not reproduced past-paper questions, and they do not replicate the exam’s exact structure, question count or mark tariffs — Cambridge International holds copyright in its own papers. Use these alongside the official past papers available from your board.
Questions
1. Define the terms candidate key and foreign key. [2]
2. Explain what is meant by referential integrity. [2]
3. State what is meant by a table being in first normal form (1NF). [1]
4. A table STUDENT has the fields StudentID, Name, Year and Tutor. Write an SQL statement to display the Name of every student in Year 12, in alphabetical order of Name. [3]
5. Explain the difference between a data definition language (DDL) and a data manipulation language (DML), giving one SQL command for each. [2]
Answers
1. A candidate key is an attribute (or smallest set of attributes) that could uniquely identify every record in a table; one candidate key is chosen as the primary key [1]. A foreign key is an attribute in one table that is the primary key of another table, used to link the two tables [1].
Examiner insight (June 2025): some candidates did not understand what a candidate key is, and a few gave primary keys when foreign keys were asked for. The primary key is also not always the first attribute listed in a table. Try the real question next: Cambridge International AS & A Level Computer Science 9618, June 2025, Paper 11, Question 5.
2. Every foreign key value must match an existing primary key value in the linked table [1], so a record cannot refer to a record that does not exist (for example, it cannot be deleted while records still refer to it) [1].
3. There are no repeating groups of attributes: every field holds a single (atomic) value and each record is unique [1].
4. SELECT Name [1] FROM STUDENT WHERE Year = 12 [1] ORDER BY Name; [1]
5. DDL is used to create and change the structure of a database, for example CREATE TABLE [1]; DML is used to add, change, delete or retrieve the data, for example SELECT, INSERT or UPDATE [1].
Where marks are usually lost
- Giving the primary key when the question asks for a foreign key.
- Assuming the primary key is the first field in a table.
- Leaving out
ORDER BYor putting the condition in the wrong clause.
Get free revision emails (optional)
Occasional emails with practice questions, worked explanations and links to free resources for the qualification and subjects you choose. No spam, and you can unsubscribe from any email. The free tools on this site never need an email.
Related resources
-
Practice Questions
O Level Computer Science: Databases — Practice Questions (Cambridge 2210)
Original exam-style questions with full worked answers on fields, records and primary keys, choosing data types for fields, and writing and reading SQL using SELECT, FROM, WHERE, ORDER BY, SUM and COUNT, for Cambridge O Level Computer Science (2210).
Computer Science · Cambridge · O LEVELS
-
Practice Questions
A Level Computer Science: Further Programming (A Level) — Practice Questions (Cambridge 9618)
Original exam-style questions with full worked answers on classes, encapsulation, inheritance and polymorphism, declarative programming, random file handling in pseudocode and exception handling, for Cambridge AS & A Level Computer Science (9618).
Computer Science · Cambridge · A LEVEL
-
Study Guides
A Level Computer Science: Information Representation (Cambridge 9618)
An overview of data representation, multimedia (graphics and sound), and compression for Topic 1 Information representation, Cambridge AS & A Level Computer Science 9618, 2027-2029 series – covering number-base conversion, file-size calculation, the choice between bitmap and vector graphics, and compression choice; see the note below on parts of 1.1 this overview does not go into.
Computer Science · Cambridge · AS LEVEL
Related articles
-
curriculum guides
Choosing subjects at IGCSE and A Level
How subject choices at 14 and 16 affect university options later, and how to keep pathways open without overloading a timetable.
28 July 2026
-
study skills
How to revise for a science examination
Most science revision fails because it rereads notes instead of retrieving them. A practical method for revising physics, chemistry and biology in the weeks before a paper.
14 July 2026
Studying this with a teacher
Working through Computer Science AS LEVEL?
This page is free and stays free. If you would rather be taught it, Marlbridge runs Computer Science classes one-to-one and in small groups of up to 15, online in your own time zone. The first trial class is free. WhatsApp replies within an hour (8am–11pm Pakistan time, every day); email the same day.
Cambridge Computer Science teachers at Marlbridge