Skip to content

13.2 File Organisation & Access

A Level · 3 questions found

  • File organisation methods: serial, sequential (key field), random (record key)
  • Sequential access for serial/sequential files; direct access for sequential/random files
  • Hashing algorithms: describe, use to read/write data to a random/sequential file
Q4
May/Jun 2024 Paper 3 v1 5 marks
Question 4 — page 1Question 4 — page 2
4 (a) Describe the sequential method of file access. ............................................................................................................................................. [2] (b) Explain how the sequential method of file access is applied to files with serial organisation and to files with sequential organisation. ............................................................................................................................................. [3]
Show mark scheme
4(a) [2 marks]
mark per mark point (
Max 2
)
Sequential access method searches for
records
one after the other
… from the physical start of the file until the
record
is found/the end of file.
4(b) [3 marks]
mark per mark point (
Max 3
)
For serial files, records are stored in chronological order
… every record needs to be checked until the record is found, or all records have been checked.
For sequential files, records are stored in order of a key field/index, and it is the key field/index 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.
Q7
May/Jun 2024 Paper 3 v2 6 marks
Question 7 — page 1Question 7 — page 2
7 (a) Outline what is meant by direct access as a method of file access. ............................................................................................................................................. [2] (b) Explain how direct access is used to locate a specific record in sequential files and random files. (i) Sequential files .................................................................................................................. ..................................................................................................................................... [2] (ii) Random files ..................................................................................................................... ..................................................................................................................................... [2] (a) Complete the pseudocode to find an item in a 1D array Widgets of type STRING, using a
Show mark scheme
7(a) [2 marks]
mark per mark point (
Max 2
)
Direct access allows a
record
to be found in a file without other records being read.
Records
are found by using the
key field
of the target record // the location of the
record
is found using a
hashing algorithm
.
7(b)(i) [2 marks]
mark per mark point (
Max 2
)
In sequential files, an index of all key fields is kept
The index is
searched
for the address of the file location where the target record is stored.
7(b)(ii) [2 marks]
mark per mark point (
Max 2
)
A
hashing algorithm
is used on the
key
field of the record
… to calculate the address of the memory
location
where the target record is expected to be stored.
Method to find a record if it is not at the expected location e.g. linear probing, search overflow area etc.
Q4
May/Jun 2024 Paper 3 v3 5 marks
Question 4 — page 1Question 4 — page 2
4 (a) Describe the sequential method of file access. ............................................................................................................................................. [2] (b) Explain how the sequential method of file access is applied to files with serial organisation and to files with sequential organisation. ............................................................................................................................................. [3] ,  ,
Show mark scheme
4(a) [2 marks]
mark per mark point (
Max 2
)
Sequential access method searches for
records
one after the other
… from the physical start of the file until the
record
is found/the end of file.
4(b) [3 marks]
mark per mark point (
Max 3
)
For serial files, records are stored in chronological order
… every record needs to be checked until the record is found, or all records have been checked.
For sequential files, records are stored in order of a key field/index, and it is the key field/index 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.