In simple terms
A friendly intro before the formal notes — no formulas yet.
A Library for Data
File organisation is how we arrange data records in storage, while file access is how we find and read them. The way you organise your data determines how efficiently you can access it.
Imagine a library. The 'organisation' is how the books are arranged on the shelves—perhaps alphabetically by author (sequential) or just placed wherever there's space (serial). 'Access' is how you find a book. You can browse shelf by shelf from the start (sequential access), or use the computer catalogue to find the exact shelf number and go straight there (direct access).
- 1
Organisation: First, decide how to physically arrange records in the file. They can be added one after another, sorted by a key, or placed at calculated addresses.
- 2
Access Method: Next, choose how to retrieve a record. This is dictated by the organisation method used.
- 3
Sequential Access: To find a record, you must start at the beginning and read through every preceding record. This is simple but can be slow.
- 4
Direct Access: To find a record, you calculate its exact location and jump straight to it. This is very fast but requires a more complex file organisation.
Explore the concept
Use the live diagram and synced steps — play it or tap a step card to walk through.
Key formulas
Tap any symbol to reveal exactly what it means and its units.
Full topic notes
Formal explanation with the rigour you need for the exam.
File Organisation Methods
File organisation refers to the way records are physically arranged and stored in a storage medium. The choice of organisation method has a significant impact on the speed of data access, storage efficiency, and the complexity of data processing. We will look at three primary methods: serial, sequential, and random.
1. Serial File Organisation
This is the simplest form of organisation. Records are appended to the end of the file in the chronological order they arrive. There is no sorting or ordering of the records themselves. Think of it as a logbook where you just write the next entry on the next available line.
Use Case: Ideal for transaction logs, error logs, or streaming data where order of arrival is important.
Adding Data: Very fast, as new records are simply added to the end.
Searching: Very slow. To find a specific record, you must start at the beginning and read every record until you find it (sequential access).
Updating/Deleting: Inefficient. Typically, the entire file must be read into memory, modified, and then written back out.
2. Sequential File Organisation
In a sequential file, records are stored in a specific order based on a 'key field'. This key field, such as a Student ID or Product Code, is unique to each record. The entire file is sorted by this key. This is like a phone book sorted alphabetically by surname.
Use Case: Excellent for batch processing, like calculating monthly payroll or generating electricity bills, where most or all records are processed in order.
Searching: More efficient than serial if searching for a range of records, but still requires reading from the start for a single record.
Adding/Deleting: Very inefficient. To maintain the sorted order, inserting or deleting a record often requires creating a new copy of the entire file.
Access: Primarily accessed sequentially.
3. Random (Direct) File Organisation
This method provides the fastest way to access an individual record. It uses a hashing algorithm to transform a record's key field into a physical disk address. This means the system can calculate exactly where a record is stored and go there directly, without reading any other records. The file is often structured as a large array of record slots.
Record Address = HashingAlgorithm(RecordKey)
Use Case: Essential for real-time systems where speed is critical, such as airline reservation systems, online banking, or any large database requiring instant record retrieval.
Hashing Collisions: A problem occurs when the hashing algorithm produces the same address for two different keys. This is called a 'collision' and must be handled, often by placing the second record in an 'overflow area', which can slow down access.
Storage: Can lead to wasted storage space, as the file must have space allocated for all possible hash values, some ofwhich may not be used.
Access: Designed specifically for direct access.
A common exam question asks you to justify the choice of file organisation for a given scenario. Always link your choice back to the application's requirements. Does it need fast access to single records (random)? Or does it process all records in a batch (sequential)?
File Access Methods
File access refers to the way in which records are read from or written to a file. The method of access is often determined by the underlying file organisation.
1. Sequential Access
Records are accessed in the order they are stored. To read the 100th record, you must first read the 99 records before it. This is the only possible access method for serial files and the natural method for sequential files.
2. Direct Access
Also known as random access, this method allows the read/write head to jump directly to a specific record's physical location. This is only possible if the file is organised as a random file, where a record's address can be calculated from its key.
Worked examples
See the formulas applied — reveal one step at a time, like the exam.
A sequential file on a magnetic tape stores 20,000 employee records. The system takes 0.8 ms to read a single record. Calculate the time taken, in seconds, to access the 15,000th record. State one assumption you have made.
- 1
Number of records to read = 15,000
A random access file is used to store 1000 patient records, indexed from 0 to 999. The hashing algorithm used is .
(a) Calculate the storage address for a patient with ID 45821. (b) A new patient with ID 77821 needs to be added. Calculate their address and identify the problem that arises.
- 1
Apply the hashing algorithm:
How it all connects
The big idea sits in the middle — tap a linked idea to explore the link.
Tap a linked idea to see how it connects back to the main topic — that connection is what examiners reward.
Glossary
Try to recall each definition before you reveal it.
Quick check
Answer in your head first — then tap to check. No pressure.
Revision flashcards
Flip the card. Test yourself before the exam.
What is serial file organisation?
Records are stored one after another in the order they are added. There is no inherent sorting or ordering of the records themselves. It's like a simple diary or log file.
Key takeaways
Review these before you close the topic — retrieval beats re-reading.
- ✓
Use Case: Ideal for transaction logs, error logs, or streaming data where order of arrival is important.
- ✓
Adding Data: Very fast, as new records are simply added to the end.
- ✓
Searching: Very slow. To find a specific record, you must start at the beginning and read every record until you find it (sequential access).
- ✓
Updating/Deleting: Inefficient. Typically, the entire file must be read into memory, modified, and then written back out.
Practice — then mark it
The whole point: a real Cambridge question, marked mark-by-mark.
Test Your Knowledge
Test Your Knowledge
Extra simulations & links
PhET, GeoGebra and other curated tools — open in a new tab.
Frequently asked
Checkpoint
One marked question is worth ten re-reads — close the loop before you move on.
Reading it isn’t knowing it — prove it.
Before you move on: do Test Your Knowledge on paper, snap a photo, and get examiner-style feedback on exactly where you win and lose marks.