Access Methods
10.2 Access Methods
10.2.1 Sequential Access
- A sequential access file emulates magnetic tape operation, and generally supports a few operations:
- read next - read a record and advance the tape to the next position.
- write next - write a record and advance the tape to the next position.
- rewind
- skip n records - May or may not be supported. N may be limited to positive numbers, or may be limited to +/- 1.
10.2.2 Direct Access
- Jump to any record and read that record. Operations supported include:
- read n - read record number n. ( Note an argument is now required. )
- write n - write record number n. ( Note an argument is now required. )
- jump to record n - could be 0 or the end of file.
- Query current record - used to return back to this record later.
- Sequential access can be easily emulated using direct access. The inverse is complicated and inefficient.
10.2.3 Other Access Methods
- An indexed access scheme can be easily built on top of a direct access system. Very large files may require a multi-tiered indexing scheme, i.e. indexes of indexes.