× back Terminologies Sequential file organization Random/Direct File organization Index Sequential file organization Multi key file organization
Next Topic → ← Previous Topic

File Organization

File structures Terminologies

Sequential file organization

Storing sequential file

  • Sequential files can be stored on serial-access as well as direct-access devices.

Advantages

  1. Faster access to next record.
  2. Access time is very good.
  3. Simplicity

Disadvantages

  1. If pattern of access do not match with record ordering pattern then access time goes very high.
  2. Data can be accessed sequentially only.

Random/Direct File organization

Storing direct file

  • Direct files can only be stored on direct-access devices.

Advantages:

  1. Ability to access individual record directly, i.e. a record can be retrieved, inserted, modified or deleted without affecting other records.
  2. Access time for one record at a time is very good.

Disadvantages

  1. When all records are to be accessed at a time then it gives poor performance.

Index Sequential file organization

Advantages

  1. Ability to access individual record directly as well as all the record sequentially.

Multi key file organization

1. Inverted file organization

  • In this file organization a key's inversion index contain all of the values that the key presently has in the records of the data file. Each key-value entry in the inversion index points to all the data records that have the corresponding value. The data file is said to be inverted on that key.
  • Inverted files are sorted on inversion index so that binary search can be applied to find out index or record. Whenever record is added in data file its corresponding entry has to be made in inverted file.

2. Multi list file organization

  • In multi list file organization the index contain all values that the secondary key has in data file same as inverted file but the difference is that the entry in the multi index for a seconday key is pointer to the first data record with thay key value. That record contains pointer to second record having same key. Thus there is a linked of data records for each value of secondary key. Multi list chains are usually bidirectional and occasionally are circular to improve update operation.