Page 115 - Accounting Information Systems
P. 115
86 PART I Overview of Accounting Information Systems
FI GU RE
2-38 INDEXED RANDOM FILE STRUCTURE
Physical Disk Storage Device
Index
Key Value Record 1876
Address
1876 Cylinder, surface, 2219
record #
1956 97, 14, 128
2130
2219 102, 03, 200
5521 06, 10, 501 1956
1124 125, 02, 16
1872 200, 12, 350 1124
2130 04, 06, 87
used to speed the search through the index to find a key value. This becomes particularly important for
large data files with associated large indexes.
The principal advantage of indexed random files is in operations involving the processing of
individual records (Operations 1, 2, 3, and 6 in Table 2-2). Another advantage is their efficient use of
disk storage. Records may be placed wherever there is space without concern for maintaining contigu-
ous storage locations. However, random files are not efficient structures for operations that involve
processing a large portion of a file. A great deal of access time may be required to access an entire
file of records that are randomly dispersed throughout the storage device. Sequential files are more ef-
ficient for this purpose.
VIRTUAL STORAGE ACCESS METHOD STRUCTURE
The virtual storage access method (VSAM) structure is used for very large files that require routine
batch processing and a moderate degree of individual record processing. For instance, the customer file
of a public utility company will be processed in batch mode for billing purposes and directly accessed in
response to individual customer queries. Because of its sequential organization, the VSAM structure can
be searched sequentially for efficient batch processing. Figure 2-39 illustrates how VSAM uses indexes
to allow direct access processing.
The VSAM structure is used for files that often occupy several cylinders of contiguous storage on a
disk. To find a specific record location, the VSAM file uses a number of indexes that describe in summa-
rized form the contents of each cylinder. For example, in Figure 2-39, we are searching for a record with
the key value 2546. The access method goes first to the overall file index, which contains only the highest
key value for each cylinder in the file, and determines that Record 2546 is somewhere on Cylinder 99. A
quick scan of the surface index for Cylinder 99 reveals that the record is on Surface 3 of Cylinder 99.