gtpc3m1h | Concepts and Structures |
Through the use of fixed and pool records, unique application data structures are created during the design stage of an application. This implies that the structure of the data associated with an application is predefined and not readily changed once the application is implemented.
The fixed record area is an area of file storage that contains records whose symbolic addresses can be calculated using a record type or record ID and an ordinal number. The record type or record ID identifies a set of data within the fixed record area, and the ordinal number identifies a specific record within the record type.
As an example, consider again the example of organizing passengers for an airline's reservation application. Figure 28 shows the concept of record type (in this case, #INDEX) and ordinal numbers (0 through 25).
In order to retrieve (that is, to find or read) a pool record, the application must know its address. The most common technique used by applications is to form data structures that use fixed records as indexes to pool records.
Refer again to Figure 28. The index (a fixed file record) is retrieved by using the first letter of the passenger's last name to calculate the address of the appropriate index record. The index is then scanned for the passenger's name, and, when it is found, the associated pool address is used to locate the passenger name record. This allows the selection of one of a vast number of pool records with a minimum of file accesses (that is, I/O operations).