File Access (Cambridge (CIE) A Level Computer Science): Revision Note
Exam code: 9618
File access methods
What are file access methods?
Once a file is organised and stored, it must be accessed correctly in order to retrieve or update data
The method of access depends on the file organisation used
Sequential access
Sequential access means accessing records one after another, in order, starting from the beginning of the file
Key features | Used with |
---|---|
Reads records in sequence | Serial and Sequential files |
Slower for searching large files | Must process earlier records first |
Efficient when reading the whole file | Ideal for batch processing (e.g. payroll, reports) |
Example: Reading every student's exam result in order of candidate number
Direct (random) access
Direct access allows a program to jump straight to the location of a specific record, without reading previous ones
Key features | Used with |
---|---|
Accesses records directly by position or key | Sequential (with indexing) and Random files |
Fast access to individual records | Ideal for databases and real-time systems |
Requires a calculation or index to find the correct location (e.g. hashing) | Useful when you need to look up a record quickly |
Example: Accessing a bank account record by account number
You've read 0 of your 5 free revision notes this week
Unlock more, it's free!
Did this page help you?