b_book1.gif (162 bytes)Data - Organisation | Data processing
b_html2.gif (189 bytes)Examples

Index sequential

dadoise2.gif (6685 bytes)
dadoise1.jpg (28567 bytes)

The data file is loaded in serial order, each record getting a unique record number. A separate record is created in an "index" file containing a key and the data record number (address).

Features

  • More than one index may be maintained (see bottom diagram)
  • The index is kept in sorted order, most often Tree techniques (a B+ Tree being the most common), are used for maintaining the order of a index.  (diagram top). Blocks are usually linked sequentially.
  • The data file is loaded in serial order, each record getting a unique record number. In order to improve index performance, the data file may be sorted, and indexes regenerated, when not in use. Subsequent additions/deletions may destroy the sequence, so periodic reorganisation is done to restore it.
  • Access may be sequential or direct.
  • Records have same length.
  • This is the most common file format and is the basis for most Relational databases.
Index non-sequential:
The data file is entered in random order but accessed in one or more sequential orders (Bottom diagram). For accounting systems the transaction file is maintained in the order it was entered, hence maintaining an audit trail. The index allows the transactions to be attached to their accounts.

Examples:

  • Advantages
    • Processing both sequential and random
    • Almost as fast as relative
  • Disadvantages
    • Must use direct access storage device
    • Complex
    • Does not cope well with frequent additions (File disorganised)