Worked solution from the Databases Paper 2 Algorithms, Programming and Logic booklet, Part 2 of 2.
Count the columns, then the rows of data.
Fields: 11 [1]
Records: 15 [1]
Write: the Type field contains data that repeats, so it is not unique [1]
Pick one different field for each type:
| Field | Data type |
|---|---|
| RoomNo (or Type) | alphanumeric |
| Mon (or any other day) | Boolean |
| Rate$ | real |
| Guests | integer |
Four correct [2]
Note: two or three correct scores [1].
The statement picks rooms where Mon is not T, that is, where Mon is F. Show only the four named columns.
| RoomNo | Type | Guests | Rate$ |
|---|---|---|---|
| 104S | Single | 1 | 72.50 |
| 105S | Single | 1 | 72.50 |
| 201F | Family | 4 | 160.00 |
| 301D | Double | 2 | 200.00 |
| 304P | Suite | 6 | 700.00 |
Data from the four correct columns [1]
Rows in the order shown, at least two rows and two columns [1]
All data correct with no extra content [1]
▶ Topic lesson
A lesson on this topic · by Mr Bulmer's Learning Zone. 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.