The operations performed by some of the commonly used

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: contents (which serves as an index) or the index at the back of the book to locate the page number, and then turn directly to that page to begin reading. Indexed sequential files use exactly the same principle. As shown in Figure 16.3, in indexed sequential file organization there are actually two files for every data file - the data file which contains the records stored in the file, and the smaller index file which contains the key and disk address of each record stored in the data file. The records of the file can be stored in random sequence but the index table is in sorted sequence on the key value. This provides the user with a very powerful tool. Not only can the file be processed randomly, but it can also t processed sequentially. A request for a particular record is first directed to the smaller, more accessible index file, which in turn, points to the physical location of the desired record on the direct access storage device such as disk. For instance, to locate the record of an employee (in the example of Figure 16.3) whose employee is 0004, the computer first searches the index file for this employee code key and obtains the address value 1002 corresponding to it. It then directly accesses the record stored at the address location 1002 of the storage device. This technique of file management is commonly referred to as the Indexed Sequential Access Method (ISAM) and the files of this type are called ISAM files. Employee Address Code (key) Location 0001 0002 0003 0004 ••• 1003 1001 1004 1002 ••• Address Location 1001 1002 1003 1003 ••• Employee Record 0002 0004 0001 0003 •«• R. S. Patel... R. K. Rana... K. P. Sinha... N.P.Singh... Advantages of Indexed Sequential Files Indexed sequential files typically have the following advantages: 1. They can be quite efficiently used for sequential processing for applications in which the activity ratio is high. 2. They can also be used quite efficiently for direct access processing for applications in which the activity ratio is low. Di...
View Full Document

Ask a homework question - tutors are online