9618/31 May/June 2024 · Question 4 · 5 marks
(a) Describe the sequential method of file access. (b) Explain how the sequential method of file access is applied to files with serial organisation and to files with sequential organisation.
Points that gain marks
- (a) Sequential access searches for records one after the other …
- … from the physical start of the file until the record is found or the end of the file is reached.
- (b) In serial files, records are stored in chronological order …
- … so every record needs to be checked until the record is found, or all records have been checked.
- In sequential files, records are stored in order of a key field, and it is the key field that is compared …
- … every record is checked until the record is found, or the key field of the current record is greater than the key field of the target record.
In this lab: Levels 1–4: the serial file is read to the end; the sequential file stops at the first bigger key.