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

Q33 · 9618/33/O/N/24 Q5

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

Q339618/33/O/N/24original Q5Structured · 5 marks
Question 5 from 9618/33/O/N/24

Worked solution

(a)

Write any three of these:

A hashing algorithm is used in direct access to find records in a file, and it is a mathematical formula (calculation) [1]

The calculation is applied to the key field of the record being stored or searched for [1]

The result gives the address where the record is stored or should be found [1]

The first line holds two separate points (used in direct access, and a mathematical formula). Each can earn a mark, but the most you can score is 3.

(b)

Give two methods:

Store the record in the next free space after the one the algorithm gave (linear progression) [1]

Set up an overflow area and store the record in the next free space there [1]

KEY IDEAA hashing algorithm turns the key field into a storage address, and clashes are fixed by using the next free space or an overflow area.
TOTAL 5 marks

Official mark scheme

Mark scheme for 9618/33/O/N/24 question 5
VIDEO
▶ Whole paper

Video solution of the whole paper · by Zafar Ali Khan (ZAK). 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.