About Databases in A Level Computer Science
Databases is one of the 10 main topics in our A Level Computer Science (Cambridge (CAIE) 9618) question bank, and about 5% of its real questions come from it. Tayyari Karo has 51 real questions on this topic from 2021 to 2026, from Paper 1. By difficulty: 29 medium, 16 easy, 6 hard.
Work through the questions below, then open the explanation for each one. Redo the ones you missed a few days later.
Try 8 real questions
These are real past-paper questions. Think of your answer first, then open the explanation.
May/June 2026 · Paper 1 · Databases
The toy borrowed with BorrowID A2226 has been returned. Write an SQL script to amend the record and store that the toy has been returned. [3]
Show model answer
1 mark each: updating the correct table, setting the additional field to the correct data (data type must match 4(c)(i)), a WHERE clause.
UPDATE BORROW
SET Returned = "Yes"
WHERE BorrowID = "A2226";
UPDATE ... SET ... WHERE changes the single record.
October/November 2025 · Paper 1 · Databases
Write a Structured Query Language (SQL) script to delete all placements that have been completed.
Show model answer
DELETE FROM PLACEMENT WHERE Complete = TRUE;
DELETE FROM and correct table, correct condition.
May/June 2024 · Paper 1 · Databases
(c)(ii) Write an SQL script to return the number of events that each player has completed.
Show model answer
SELECT PlayerID, COUNT(EventID)
FROM EVENT
GROUP BY PlayerID;
3 marks: 1 for selecting PlayerID, 1 for counting EventID, 1 for grouping by PlayerID.
May/June 2023 · Paper 1 · Databases
(a)(i) An organisation uses a database to store data about bird sightings. State what is meant by a data dictionary and give one example of an item typically found in a data dictionary.
Show model answer
Definition: Data about the data in the database / data about the structure of the database / metadata for a database.
Example: table names, data types, field names.
2 marks: 1 for definition, 1 for example.
October/November 2023 · Paper 1 · Databases
(b) Identify three advantages of a relational database compared to a file-based approach.
Show model answer
• Reduced data redundancy
• Improved data integrity / consistency / referential integrity
• Allows for views / improved privacy
• Allows for program-data independence
• Complex queries can be executed
3 marks: 1 for each bullet point to max 3.
October/November 2022 · Paper 1 · Databases
(c)(i) State what is meant by a tuple. Give an example of a tuple from PHOTO_DATA.
Show model answer
Definition: A single row in a table.
Example: ST23-56, BD987, 08:34, NIK-02 (or any row from PHOTO_DATA)
2 marks: 1 for definition, 1 for example.
May/June 2021 · Paper 1 · Databases
(a) Bobby tells Kim that a file-based approach is usually better than a relational database. Explain why Bobby is incorrect.
Show model answer
• Flat-file has more data redundancy because the same data is stored many times / data is stored in different tables which are linked
• There is program-data dependence with flat-files because any changes to the structure of the data means the programs that access that data have to be re-written
• Flat-file has more data inconsistency / worse data integrity because duplicated data might be stored differently / when data is updated in one place, it is not updated everywhere
• It is not easy to perform complex searches/queries because a new program has to be written each time
• Flat files could have a lack of privacy as user views cannot easily be implemented
3 marks: 1 per bullet point to max 3.
May/June 2021 · Paper 1 · Databases
(c) A database has a data dictionary. Give three items that are stored in a data dictionary.
Show model answer
1. Table name
2. Field name / attribute
3. Data type
(Also acceptable: type of validation, Primary Key, Foreign Key, relationships)
3 marks: 1 per item to max 3.