Indexed sequential access file combines both sequential file and direct access file organization.

In indexed sequential access files, records are stored randomly on a direct access device such as a magnetic disk by a primary key.

This file has multiple keys. These keys can be alphanumeric in which the records are ordered is called the primary key.

The data can be access either sequentially or randomly using the index. The index is stored in a file and read into memory when the file is opened.

Advantages of Indexed sequential file organization

  • In indexed sequential access file, sequential file and random file access is possible.
  • It accesses the records very fast if the index table is properly organized.
  • The records can be inserted in the middle of the file.
  • It provides quick access for sequential and direct processing.
  • It reduces the degree of the sequential search.

Disadvantages of Indexed sequential file organization

  • Indexed sequential access file requires unique keys and periodic reorganization.
  • Indexed sequential access file takes a longer time to search the index for data access or retrieval.
  • It requires more storage space.
  • It is expensive because it requires special software.
  • It is less efficient in the use of storage space as compared to other file organizations.

Inverted list organization:

  • Like the indexed- sequential storage method the inverted list organization maintains an index. The two methods differ, however, in the index level and record storage. The indexed sequential method has a multiple indexes for a given key, where as the inverted list method has a single index for each key type.
  • In an inverted list, records are not necessarily stored in a particular sequence. They are placed in the data storage area, but indexes are updated for the record key and location.
  • The inverted keys are best for applications that request specific data on multiple keys. They are ideal for static files because additions and deletions cause expensive pointer updating.

Advantages of Inverted list organization

Used in applications requesting specific data on multiple keys.

Example:

  • Data for the flight reservation system.
    The flight number, description, and the departure time are as given as keys. In the data location area, no particular sequence is followed. If a passenger needs information about the Houston flight, the agent requests the record with Houston flight. The DBMS carries a sequential search to find the required record. The output will then be That the flight number is 170 departing at 10.10 A.M and flight number 169 departing at 8.15 A.M.

Chaining:

  • File organization requires that relationships be established among data items. It must show how characters form fields, fields form files and files relate to each other. Establishing relationships is done through chaining. It uses pointers.

Example: 

The file below contains auto parts that are an indexed sequential file sequenced by part no. A record can be retrieved by part no. To retrieve the next record, the whole file has to be searched. This can be avoided by the use of pointers.