Worked solution from the Databases Paper 2 Algorithms, Programming and Logic booklet, Part 2 of 2.
The primary key must be different for every record. The catalogue number is unique to each song.
Write: SongNumber [1]
Choose the type that fits the data in each field:
| Field | Data type |
|---|---|
| SongNumber | Text / Alphanumeric |
| Title | Text / Alphanumeric |
| Recorded | Date/time |
| Minutes | Real |
SongNumber and Title both correct (text/alphanumeric) [1]
Recorded (date/time) and Minutes (real, as it has decimals like 3.75) both correct [1]
Look at what each function does to the rock songs.
SUM adds up the Minutes values, so the first statement finds the total number of minutes of music [1]
COUNT counts the Title values, so the second statement finds the total number of songs [1]
Both statements only use records where the genre is rock [1]
▶ Whole paper
Video solution of the whole paper · by CS BY AQIB KHAN. 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.