Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 1 of 3.
Use STRING for the code and format, INTEGER for the year and running time, and DATE for the date.
TYPE VideoLibrary
DECLARE VideoID : STRING
DECLARE Title : STRING
DECLARE ReleaseYear : INTEGER
DECLARE PurchaseDate : DATE
DECLARE VideoFormat : STRING
DECLARE RunningTime : INTEGER
ENDTYPETYPE VideoLibrary and ENDTYPE correct [1]
DECLARE used correctly for every field [1]
The three STRING fields correct [1]
The remaining three fields correct [1]
Field: VideoFormat [1]
Reason: it can only have a fixed set of possible values (such as DVD, Blu-ray, 4K, MP4) [1]
▶ Topic lesson
A lesson on this topic · by ZAINEMATICS. 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.