9618/31/O/N/23 question 4: worked solution (October/November 2023, paper 31)

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. Q25 9618/31/O/N/23 original Q4 Structured · 6 marks 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 IDEA Sequential 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 VIDEO ▶ Topic lesson A lesson on this topic · by ZAINEMATICS. Tap the picture to open it on YouTube.