Worked solution from the Databases Paper 1 Theory Fundamentals booklet, Part 2 of 2.
MANAGER.ManagerID: primary key. SHOP.ManagerID: foreign key. CAR.RegistrationNumber: primary key. CAR.ShopID: foreign key.
| Table | Field name | Primary key | Foreign key |
|---|---|---|---|
| MANAGER | ManagerID | ✓ | |
| SHOP | ManagerID | ✓ | |
| CAR | RegistrationNumber | ✓ | |
| CAR | ShopID | ✓ |
Two or three correct ticks [1]
All four correct [1]
Access rights give Javier and the managers access to different parts of the database. [1]
Do this with different accounts (logins) that have different rights, for example read only, read and write, or no access. [1]
Give each user a specific view, for example a manager only sees the data for their own shop(s). [1]
SELECT COUNT(RegistrationNumber) FROM CAR GROUP BY ShopID
RegistrationNumber inside COUNT [1]
Table CAR [1]
GROUP BY [1]
INSERT INTO CAR
VALUES ("123AA","Tiger","Lioness",10500,"12BSTREET")INSERT INTO [1]
VALUES [1]
▶ Whole paper
Video solution of the whole paper · by qiphyedu. 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.