Objectives: Introduction Over View of System Analysis and Design



Download 0.94 Mb.
View original pdf
Page87/140
Date13.11.2023
Size0.94 Mb.
#62581
1   ...   83   84   85   86   87   88   89   90   ...   140
ms-04

7.3.4 Direct- Access organization
In direct – access file organization, records are placed randomly throughout the file. Records need not be in sequence because they are updated directly and rewritten

back in the same location. New records are added at the end of the file or inserted in specific locations based on software commands. Records are accessed by addresses that specify their disk locations. An address is required for location a record, for linking records, or for establishing relationships. Addresses are of two types absolute and relative. An absolute address represents the physical location of the record. It is usually stated in the format of sector/track/record number. For example, 3/14/6 means go to sector 3, track 14 of that sector, and the sixth record of the track. One problem with absolute addresses is that they become invalid when the file that contains the records is relocated on the disk. One way around this is to use pointers for the updated records. A relative address gives a record location relative to the beginning of the file. There must be fixed-length records for reference. Another way of locating a record is by the number of bytes it is from the beginning of the file (see Figure 7.1). Unlike relative addressing, if the file is move, pointers need not be updated, because the relative location of the record remains the same regardless of the file location.

FIGURE 7.1 Absolute and Relative Addressing – An Example Thus each file organization method has advantages and limitations. Many applications by their nature are best done sequentially. Payroll is a good example. The system goes through the employee list, extracts the information and prepares payslips. There are no lengthy random-access seeks. In contrast, real-time applications where response requirements are measured in seconds are candidates for random-access design. Systems for answering inquires, booking airlines or stadium seats, updating checking or savings accounts in a bank, or interacting with a terminal are examples for random- access design. FIGURE 7.2 File Organization Methods – A Summary

Download 0.94 Mb.

Share with your friends:
1   ...   83   84   85   86   87   88   89   90   ...   140




The database is protected by copyright ©ininet.org 2024
send message

    Main page