Cambridge O Level Computer Science 2210 · 9.4 Structured query language (SQL)

Q15 · 2210/22/O/N/23 Q10

Worked solution from the Databases Paper 2 Algorithms, Programming and Logic booklet, Part 2 of 2.

Q152210/22/O/N/23original Q10Structured · 8 marks
Question 10 from 2210/22/O/N/23

Worked solution

(a)

Count the rows of data (not the heading row). Codes run from H002 to H037.

Write: 18 [1]

(b)

Field: Code [1]

Reason: each entry is a unique identifier, so no two records share it [1]

(c)

Match each field to a different data type from the list:

FieldData type
Breedtext
GenderBoolean
Ageinteger
Arriveddate/time

Four correct [2]

Note: two or three correct scores [1].

(d)

Write the table name after FROM and the field name after WHERE.

SELECT Code, Breed
FROM Horses
WHERE BreedOrigin = "Scotland";

SELECT [1]

Horses [1]

BreedOrigin [1]

KEY IDEAPick the unique field as the primary key and choose the SELECT, FROM and WHERE parts from the question.
TOTAL 8 marks

Official mark scheme

Mark scheme for 2210/22/O/N/23 question 10
VIDEO
▶ Whole paper

Video solution of the whole paper · by Paper solver.. 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.