The searching is carried out with respect to certain

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: sadvantages of Indexed Sequential Files 1. They require relatively expensive hardware and software resources because they must be stored on a direct-access device such as a disk. 2. They require more storage space than other types of files because the index file can also become quite large. 3. When used for direct access online applications, access to records may be slower than direct files. File Utilities File utilities consist of routines, which perform a variety of generalized operations on data files. Normally, they are quite general in nature in the sense that they can operate on any data format and even on data files stored on different types of storage medium. The operations performed by some of the commonly used file utilities are described below. Sorting A file sorting utility is used to arrange the records of a file in some defined sequence. This sequence is determined by the ordering of certain specified fields (known as keys) within the record. The simplest case of sorting is an ordering of the records in a file on a single key. For example, the records of an employee file may be sequenced by ascending order of employee code as shown in Figure 16.4. A more complex ordering may be produced by introducing a further key in the sorting process. For example, suppose each record of the employee file also contains a field for department code to which the employee belongs. Now the order of sorting may be employee code within department code. This means that all records for the lowest department code are presented for each employee belonging to that department in ascending sequence of employee code, then all records for the next department code, and so on. This is shown in Figure 16.5. Out of the two keys used in this sorting example, department code is called the primary key and employee code is called the secondary key because the order oi sorting is employee code within department code. The size of keys, the number of keys, and the type of ordering (ascending, descending), which can be specified as inp...
View Full Document

This document was uploaded on 04/07/2014.

Ask a homework question - tutors are online