2 Feb 2020

  • February 02, 2020
  • Amitraj
Hash or Direct File Organization


Hash File Organization uses the computation of hash function on some fields of the records. The hash function's output determines the location of disk block where the records are to be placed.







-> When a record has to be received using the hash key columns, then the address is generated, and the whole record is retrieved using that address. In the same way, when a new record has to be inserted, then the address is generated using the hash key and record is directly inserted. The same process is applied in the case of delete and update.


-> In this method, there is no effort for searching and sorting the entire file. In this method, each record will be stored randomly in the memory.












Pros Of Hash / Direct / Random File Organization -

1. Records can be immediately accessed for updation.

2. Several files can be simultaneously updated during transaction processing.

3. Transaction need not be sorted.

4. Existing records can be modified.




Cons Of Hash File Organization -

1. Special backup and reconstruction procedures must be established.

2. Less efficient use of storage space.

3. Expensive hardware and software are required.

4. High complexity in programming.

5. File updation is more difficult when compared to that of sequential method.

Translate

Popular Posts