Friday, April 3, 2020
File Access Methods
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.
2. Direct Access
Jump to any
record and read that record. Operations supported include:
o
read n - read record number n.
o write n - write record
number n.
o jump to record n -
could be 0 or the end of file.
o Query current record -
used to return back to this record later.
o Sequential access can
be easily emulated using direct access. The inverse is complicated and
inefficient.
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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment