2210/22/M/J/23 question 10: worked solution (May/June 2023, paper 22)
Show as plain textHide plain text
Cambridge O Level Computer Science 2210 · 9.4 Structured query language (SQL) Worked solution from the Databases Paper 2 Algorithms, Programming and Logic booklet, Part 2 of 2. Q14 2210/22/M/J/23 original Q10 Structured · 6 marks Worked solution (a) The primary key must be different for every record. The catalogue number is unique to each song. Write: SongNumber [1] (b) 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] (c) 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] KEY IDEA A primary key is unique, data types match the data, SUM adds values and COUNT counts records. TOTAL 6 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by CS BY AQIB KHAN. Tap the picture to open it on YouTube.