Hashing Technique
Data is stored in data blocks at addresses generated using a hash function. The location where these records are stored is called a data block or data bucket. In this organization, records are stored at known addresses rather than by location. To write a record, the address is first calculated by applying a mathematical function to obtain the record’s key. The data record is saved to the generated address. In this case, the records are stored in BUCKETS, which are storage units that can store one or more records. For example, the hash function h(K) = K mod 7 hashes 35 and 43 to addresses 0, 1, as shown below,
43 mod 7 = 135 mod 7 = 0
Hash File Organization in DBMS
Hashing techniques are used to retrieve specific data. Searching through all index values to reach the desired data becomes very inefficient, in this scenario we may use hashing as an efficient technique for locating desired data directly on disk without using an index structure.
Hash File Configuration is also known as Direct file configuration.
Contact Us