3 Feb 2020

  • February 03, 2020
  • Amitraj
Hashing

In a huge database structure, it is very inefficient to search all the index values and reach the desired data. Hashing technique is used to calculate the direct location of a data record on the disk without using index structure.

-> Hashing uses hash functions with search keys as parameters to generate the address of a data record.




Hash Organization

1. Bucket -  In this technique, data is stored at the data blocks whose address is generated by using the hashing function. The memory location where these records are stored is known as data bucket or data blocks.


2. Hash Function -   A hash function, h, is a mapping function that maps all the set of search-keys K to the address where actual records are placed. It is a function from search keys to bucket addresses.


-> In this, a hash function can choose any of the column value to generate the address. Most of the time, the hash function uses the primary key to generate the address of the data block. A hash function is a simple mathematical function to any complex mathematical function. We can even consider the primary key itself as the address of the data block. That means each row whose address will be the same as a primary key stored in the data block.





Types Of Hashing -






Click On the links given below to read in detail about static and dynamic hashing -


 1. Static Hashing

 2. Dynamic Hashing











Translate

Popular Posts