Objectives: Introduction Over View of System Analysis and Design



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

7.3.1 Sequential Organization
Sequential organization simply means storing and sorting in physical, contiguous blocks within files on tape or disk. Records are also in sequence within each block. To access a record, previous records within the block are scanned. Thus sequential record design is best suited forget next activities, reading one record after another without a search delay. Ina sequential organization, records can be added only at the end of the file. It is not possible to insert a record in the middle of the file, without rewriting the file. Ina database system, however, a record maybe inserted anywhere in the file, which would automatically resequence the records following the inserted record. Another approach is to add all new records at the end of the file and later sort the file on a key (name, number, etc. Obviously, in a 60,000- record file it is less time-consuming to insert the few records directly than to sort the entire file. Ina sequential file update, transaction records are in the same sequence as in the master file. Records from both files are matched, one record at a time, resulting in an updated master file. For example, the system changes the customer’s city of residence as specified in the transaction file (on floppy disk) and corrects it in the master file. AC in the record number specifies replace an A add and a D delete Ina personal computer with two disk drives, the master file is loaded on a diskette into drive Awhile the transaction file is loaded on another diskette into drive B. Updating the master file transfers data from drive B to A, controlled by the software in memory.



7.3.2 Indexed- Sequential Organization
Like sequential organization, keyed sequential organization stores data in physically contiguous blocks. The difference is in the use of indexes to locate records. To understand this method, we need to distinguish among three areas in disk storage prime area, overflow area and index area. The prime area contains file records stored by key or ID numbers. All records are initially stored in the prime area. The overflow area contains records added to the file that cannot be placed in logical sequence in the prime area. The index area is more like a data dictionary. It contains keys of records and their locations on the disk. A pointer associated with each key is an address that tells the system whereto find a record. In an airline reservation file, the index area might contain pointers to the Chicago and Delhi flights. The Chicago flight points to the Chicago flight information stored in the prime area. The Delhi flight points to the Delhi flight information in the prime area. Lack of space to store the Brisbane flight in sequential order make it necessary to load it in the overflow area. The overflow pointer places it logically in sequential order in the prime area. The same arrangement applies to the other flights.
Indexed-sequential organization reduces the magnitude of the sequential search and provides quick access for sequential and direct processing. The primary drawback is the extra storage space required for the index. It also takes longer to search the index for data access or retrieval.

Download 0.94 Mb.

Share with your friends:
1   ...   81   82   83   84   85   86   87   88   ...   140




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

    Main page