Wednesday, April 22, 2009

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 for "get next" activities, reading one record after another without a search delay.

In a 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. In a data base system, however, a record may be 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 6O,OOO-record file it is less time-consuming to insert the few records directly than to sort the entire file.

In a 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. A "c" in the record number specifies, "replace"; an "A," "add"; and a "D," "delete."

In a personal computer with two disk drives, the master file is loaded on a diskette into drive A (left), while 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.

No comments:

Post a Comment