Cambridge AS Level Computer Science 9618 · 8.1 Database Concepts

Q12 · 9618/12/O/N/24 Q6

Worked solution from the Databases Paper 1 Theory Fundamentals booklet, Part 1 of 2.

Q129618/12/O/N/24original Q6Structured · 12 marks
Question 6 from 9618/12/O/N/24

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 IDEAOne-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

Mark scheme for 9618/12/O/N/24 question 6
VIDEO
▶ Topic lesson

A lesson on this topic · by Craig'n'Dave. 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.