2210/22/M/J/20 question 6: worked solution (May/June 2020, 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. Q3 2210/22/M/J/20 original Q6 Structured · 6 marks Worked solution (a) Write: Field: Juice code [1] Reason: it is the only unique identifier (no two records have the same value). [1] (b) Only apple juice means both Fruit 1 and Fruit 2 must be Apple. Both criteria go on the same row, so they are joined by AND. Show only Stock level and Size. Fruit 1 Fruit 2 Size Stock level Table JUICE JUICE JUICE JUICE Sort Show no tick no tick ✓ ✓ Criteria ="Apple" ="Apple" or Fruit 1 column correct (field, table, no tick, Apple criteria) [1] Fruit 2 column correct (field, table, no tick, Apple criteria) [1] Size column correct (field, table, tick) [1] Stock level column correct (field, table, tick) [1] The Fruit 1 and Fruit 2 columns may come in any order, as long as the four columns are right. KEY IDEA A primary key must be unique; criteria on one row work together as AND. TOTAL 6 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by Zafar Ali Khan (ZAK). Tap the picture to open it on YouTube.