Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 2 of 3.
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]
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]
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]
▶ 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.