Cambridge A2 Level Computer Science 9618 · 13.2 File organisation and access

Q24 · 9618/32/M/J/23 Q2

Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 2 of 3.

Q249618/32/M/J/23original Q2Structured · 5 marks
Question 2 from 9618/32/M/J/23

Worked solution

(a)

Write: records are stored in a particular order [1]

The order is decided by the value in a key field [1]

Records are accessed one after the other, starting at the beginning of the file and checking record by record until the required record is found (or the key value is passed) [1]

(b)

Divide each key by 5 and write the remainder. 1029 ÷ 5 = 205 remainder 4 (5 × 205 = 1025). 7630 ÷ 5 = 1526 exactly, so the remainder is 0.

Record keyHash value
30033
10294
76300

Write 4 for 1029 [1]

Write 0 for 7630 [1]

KEY IDEAA sequential file is kept in key order and read from the start, and a hash value is the remainder after integer division.
TOTAL 5 marks

Official mark scheme

Mark scheme for 9618/32/M/J/23 question 2
VIDEO
▶ Whole paper

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