gtpc3m1dConcepts and Structures

Database Overview

A useful way to show data organization in the TPF system is to look at an example of a database. Refer to Figure 25 as you read through the following text.

Figure 25. Database Example. Using Fixed and Pool Records.


The example involves the information that is stored pertaining to individual passengers in an airline's reservation system. This information must be organized in such a way so as to achieve the performance objectives by minimizing the number of input/output (I/O) operations, and at the same time making the data easily accessible to the application.

In the TPF system, a typical way to organize this data is through a hierarchical structure where the higher level is an index to the lower level that contains the detailed information about each passenger. In this example, the index is organized by the first character of a passenger's name.

The index requires a record for each letter of the alphabet. In the TPF system, fixed file records are designed to be used when the required number of records can be determined in advance (that is, when a TPF system is being designed and generated). It is desirable to be able to specify the exact number, but usually a close approximation is sufficient.

Because the number of passengers is variable, the required number of records cannot be predicted with any degree of accuracy or certainty. In addition, the data stored about those passengers can change frequently, so the records must be readily accessible. In the TPF system, pool records are designed to be dispensed on an as-needed basis; that is, an application asks for a pool record when needed and the TPF system supplies the file address of such a record. (Observe that it is the responsibility of the application to save the address of the pool record in the appropriate index record.) Once passengers have completed their journey, their detailed information is no longer required, and the accompanying pool record is returned to the system for reuse by other Entries.

Because the requests for data about passengers are random and these requests are not related to each other, the physical records on a database in a TPF system are allocated in such a way as to enhance performance. This is accomplished by placing logically adjacent records (such as, B follows A, C follows B) on different physical devices. Figure 26 demonstrates the concept of horizontal record allocation, and contrasts it with the more conventional vertical record allocation.

By allowing multiple Entries to access logically adjacent (sequential) records without incurring time delays because different physical devices are accessed independently of one another, the TPF system is able to meet its performance objectives.

Figure 26. Record Allocation. Horizontal Allocation and Vertical Allocation.