Cambridge AS Level Computer Science 9618 · 8.1 Database Concepts

Q4 · 9618/11/O/N/22 Q4

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

Q49618/11/O/N/22original Q4Structured · 15 marks
Question 4 from 9618/11/O/N/22

Worked solution

(a)

Draw a line for each link, with the "many" end at the table that holds the foreign key:

CUSTOMER 1 to many PARTY [1]

PARTY 1 to many PHOTO_DATA [1]

CAMERA_DATA 1 to many PHOTO_DATA [1]

(b)

Write any three characteristics of 3NF:

No repeating groups of attributes (the data is atomic). [1]

No partial key dependencies. [1]

No non-key (transitive) dependencies. [1]

(c)(i)

Tuple: a single row in a table. [1]

Example: ST23-56, BD987, 08:34, NIK-02 (any whole row from PHOTO_DATA). [1]

(c)(ii)

SELECT COUNT(PhotoID)
FROM PHOTO_DATA
WHERE CameraID LIKE 'CAN%';

COUNT [1]

PhotoID [1]

PHOTO_DATA [1]

'CAN%' (or 'CAN*') [1]

(d)

ALTER TABLE CAMERA_DATA
ADD NumberStored INTEGER,
    LastUsed DATE;

ALTER TABLE CAMERA_DATA [1]

ADD NumberStored INTEGER (a suitable name and type) [1]

LastUsed DATE as the second field, after a comma [1]

KEY IDEAIn 3NF every field depends on the key, the whole key and nothing but the key.
TOTAL 15 marks

Official mark scheme

Mark scheme for 9618/11/O/N/22 question 4
VIDEO
▶ 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.