Worked solution from the Databases Paper 1 Theory Fundamentals booklet, Part 2 of 2.
Write any two points:
CHARACTER_ITEM is a linking table that removes the many-to-many relationship between CHARACTER and ITEM [1]
It lets each character have many items and each item be bought by many characters (it stores the items purchased for each character) [1]
Underline these attributes as the primary keys:
The three single keys: USER → Username, CHARACTER → CharacterID, ITEM → ItemName [1]
The composite key: CHARACTER_ITEM → CharacterID and ItemName together [1]
Give two methods, each with its own explanation. Any two of these pairs score:
Method: access rights (permissions) [1]
Explanation: only users with the right permissions can read or edit the USER table [1]
Method: a password on the database or the USER table [1]
Explanation: users without the password cannot get at the data [1]
Other accepted pairs: encryption (without the key, the data cannot be understood); views (users are given a view that leaves out the USER table).
Write any two ways:
Validation on the data entered [1]
Enforcing referential integrity (including cascade update / delete) [1]
Other accepted ways: cascade update / delete, or making sure the database is normalised.
ITEM purchases are in CHARACTER_ITEM, but the username is in CHARACTER, so the two must be joined.
SELECT COUNT(ItemName) FROM CHARACTER_ITEM INNER JOIN CHARACTER ON CHARACTER.CharacterID = CHARACTER_ITEM.CharacterID WHERE CHARACTER.Username = "KAT123";
SELECT COUNT [1]
FROM the correct tables with a join [1]
WHERE condition for the username "KAT123" [1]
UPDATE CHARACTER SET Level = 3, Money = 10000.00 WHERE CharacterID = "0002";
UPDATE CHARACTER [1]
SET Level and Money to the new values [1]
WHERE CharacterID = "0002" [1]
▶ Whole paper
Video solution of the whole paper · by Virtual Help. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.