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

Q25 · 9618/31/O/N/23 Q4

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

Q259618/31/O/N/23original Q4Structured · 6 marks
Question 4 from 9618/31/O/N/23

Worked solution

(a)

Sequential file organisation: records are ordered based on the key field [1]

A new version of the file must be created to update it [1]

Random file organisation: records are stored in no particular order, and a hashing algorithm links the key to the location of the record [1]

Updates can be made directly to the file [1]

(b)

Write: start at the beginning of the file and check the records one by one [1]

... until the record is found, or the end of the file (EOF) is reached (processing or updating records as needed) [1]

KEY IDEASequential files are kept in key order and read from the start, while random files use a hash of the key to find the location directly.
TOTAL 6 marks

Official mark scheme

Mark scheme for 9618/31/O/N/23 question 4
VIDEO
▶ 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.