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

Q29 · 9618/32/M/J/24 Q7

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

Q299618/32/M/J/24original Q7Structured · 6 marks
Question 7 from 9618/32/M/J/24

Worked solution

(a)

Direct access finds a record in a file without reading the other records. [1]

The record is found using its key field, or its location is worked out with a hashing algorithm. [1]

(b)(i)

In a sequential file an index of all the key fields is kept. [1]

The index is searched for the address where the wanted record is stored. [1]

(b)(ii)

A hashing algorithm is applied to the key field of the record, to calculate the address where the record should be stored. [1]

If the record is not at that address, use a method to find it, such as linear probing or searching an overflow area. [1]

KEY IDEADirect access jumps straight to a record, using an index of keys or a hash of the key.
TOTAL 6 marks

Official mark scheme

Mark scheme for 9618/32/M/J/24 question 7
VIDEO
▶ Starts at Q7 (46:46)

Starts at Q7 (46:46) · by Pseudocode Pro. 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.