Worked solution from the Databases Paper 2 Algorithms, Programming and Logic booklet, Part 2 of 2.
It is used to uniquely identify each record [1]
| Data type | Field |
|---|---|
| Boolean | CoastalHabitat |
| Integer | Lifespan |
| Real | Length (or Wingspan) |
| Text | Species (or Family) |
All four correct [2]
Note: two or three correct scores [1].
Swans are Bewick's swan (8 years), Mute swan (10) and Whooper swan (9). ORDER BY Lifespan puts them from lowest lifespan to highest.
| Species | Length | Wingspan |
|---|---|---|
| Bewick’s swan | 120.2 | 190.5 |
| Whooper swan | 150.0 | 230.0 |
| Mute swan | 150.0 | 220.2 |
Correct data, spelt correctly [1]
Correct layout of three columns [1]
Correct order [1]
SELECT Species, Family, Lifespan FROM WATERFOWL WHERE Lifespan >= 10 ORDER BY Species;
SELECT Species, Family, Lifespan [1]
FROM WATERFOWL [1]
WHERE Lifespan >= 10 [1]
ORDER BY Species [1]
▶ Whole paper
Video solution of the whole paper · by MAK CS. 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.