9618/12/O/N/24 question 6: worked solution (October/November 2024, paper 12)

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. Q12 9618/12/O/N/24 original Q6 Structured · 12 marks Worked solution (a) Write any three benefits, each with a reason: Less data redundancy , because each item of data is stored only once [1] Better data consistency / integrity , because a change in one table updates the linked data, and linked data cannot be entered differently in two tables [1] Program–data independence : changes to the data do not need programs to be re-written [1] Other accepted points: complex queries are easier to run; different views let users see only some of the data; many users can use the data at once (record locking). (b)(i) For each relationship, name its type and say which key is used. Any six of these points score: CUSTOMER to JOB is one-to-many [1] ... done by putting the primary key of CUSTOMER into JOB as a foreign key [1] EMPLOYEE to LOGIN_DATA is one-to-one [1] ... done by putting the primary key of EMPLOYEE into LOGIN_DATA as a foreign key [1] JOB to JOB_EMPLOYEE is one-to-many [1] ... done by putting the primary key of JOB into JOB_EMPLOYEE as a foreign key [1] EMPLOYEE to JOB_EMPLOYEE is one-to-many ... done by putting the primary key of EMPLOYEE into JOB_EMPLOYEE as a foreign key (b)(ii) SELECT SUM(Amount) FROM INVOICE WHERE Paid = "Y" AND DateSent >= #01/01/2023# AND DateSent <= #31/12/2023#; SELECT SUM of Amount [1] FROM INVOICE with one correct condition [1] The remaining correct condition(s) joined with AND [1] KEY IDEA One-to-many links are made by placing the primary key of the "one" table in the "many" table as a foreign key. TOTAL 12 marks Official mark scheme VIDEO ▶ Topic lesson A lesson on this topic · by Craig'n'Dave. Tap the picture to open it on YouTube.