9618/32/M/J/24 question 7: worked solution (May/June 2024, paper 32)

Show as plain text

Cambridge A2 Level Computer Science 9618 · 13.2 File organisation and access Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 2 of 3. Q29 9618/32/M/J/24 original Q7 Structured · 6 marks 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 IDEA Direct access jumps straight to a record, using an index of keys or a hash of the key. TOTAL 6 marks Official mark scheme VIDEO ▶ Starts at Q7 (46:46) Starts at Q7 (46:46) · by Pseudocode Pro. Tap the picture to open it on YouTube.