9618/13/M/J/22 question 6: worked solution (May/June 2022, paper 13)

Show as plain text

Cambridge AS Level Computer Science 9618 · 8.1 Database Concepts Worked solution from the Databases Paper 1 Theory Fundamentals booklet, Part 1 of 2. Q3 9618/13/M/J/22 original Q6 Structured · 13 marks Worked solution (a) Write about the keys and the link between the tables: The primary key StaffID in STAFF [1] links to the foreign key StaffID in DEVICE. [1] One staff member can have many devices. [1] Each device can only be with one member of staff. [1] This makes it a one-to-many relationship. (b)(i) SELECT COUNT(STAFF.StaffID) FROM STAFF INNER JOIN DEVICE ON STAFF.StaffID = DEVICE.StaffID WHERE STAFF.FirstName = 'Ali' AND STAFF.LastName = 'Khan'; COUNT [1] STAFF [1] ON [1] AND [1] (b)(ii) ALTER TABLE DEVICE ADD Returned BOOLEAN; ALTER TABLE DEVICE [1] ADD with a suitable field name and data type [1] (c) 1NF : no repeating groups (repeating attributes). [1] 2NF : every attribute depends fully on the whole (composite) primary key, with no partial dependencies. [1] 3NF : every attribute depends on the primary key and on no other attribute, with no non-key (transitive) dependencies. [1] KEY IDEA A foreign key matches a primary key in another table, which makes a one-to-many link that INNER JOIN can follow. TOTAL 13 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by A Levels Academy Islamabad. Tap the picture to open it on YouTube.