Solved MBA IT Assignment and Notes

Full width home advertisement

Post Page Advertisement [Top]

What is the disadvantage of sequential file organization? How do you overcome it? What are the advantages &  disadvantages of Dynamic Hashing?
Answer:

Disadvantages of Sequential File Organization:
 
(i)    Updates are not easily accommodated.
(ii)    Random access is not possible. To access the nth block on tape, we must first read the proceeding n – 1 blocks.
(iii)    All records must be structurally identical, if a new field has to be added, and then every record must be rewritten to provide space for the new field.
(iv)    Continuous areas may not be possible because both the primary data file and the transaction file must be looked during merging.
 
The disadvantage of sequential file organization can be overcome by hashing techniques.
In hashing technique or direct file organization, the key value is converted into an address by performing some arithmetic manipulation on the key value, which provides very fast access to records.

Key Value       Hash function       Address
Let us consider a hash function h that maps the key value k to the value h(k). The VALUE h(k) is used as an address.

The basic terms associated with the hashing techniques are:

1)  Hash table: It is simply an array that is having address of records.
2)  Hash function: It is the transformation of a key into the corresponding location or address in the hash table (it can be defined as a function that takes key as input and transforms it into a hash table index).
3)  Hash key: Let 'R' be a record and its key hashes into a key value called hash key.

Advantages and disadvantages of dynamic hashing

Advantages:
•    The main advantage is that splitting causes minor reorganization, since only the records in one bucket are redistributed to the two new buckets.
•    The space overhead of the directory table is negligible.
•    The main advantage of extendable hashing is that performance does not degrade as the file grows. The main space saving of hashing is that no buckets need to be reserved for future growth; rather buckets can be allocated dynamically.

Disadvantages:
•    The index tables grow rapidly and too large to fit in main memory. When part of the index table is stored on secondary storage, it requires extra access.
•    The directory must be searched before accessing the bucket, resulting in two-block access instead of one in static hashing.
•    A disadvantage of extendable hashing is that it involves an additional level of indirection.


No comments:

Post a Comment

Bottom Ad [Post Page]

| Designed by Colorlib