Indexed Sequential File Access
Many real-world applications such as student record systems at universities involve both:
- Interactive random access: For example, keyed access is used to locate individual records.
- Cosequential batch processing:
For example, list the courses taken by all sophomores and juniors.
Cosequential processing is introduced in Chapter 8, which is skipped by us.
It is defined as
The coordinated processing of two or more sequential lists to produce a single output list.
The processing may involve merging, matching, or both.
We may come back to Chapter 8 if the time is allowed.
This kind of applications usually requires to use the Indexed Sequential Access Method (ISAM), which provides two alternative views of a file:
- Indexed: the file can be seen as a set of records indexed by key; or
- Sequential: the file can be accessed sequentially (physically contiguous records—no seeking), returning records in order by key.
The definition of an ISAM is
A method for managing how a computer accesses records and files stored on a hard disk.
While storing data sequentially, ISAM provides direct access to specific records through an index.
This combination results in quick data access regardless of whether records are being accessed sequentially or randomly.