Hashing VS Indexing

coolDude picture coolDude · Dec 16, 2013 · Viewed 8.4k times · Source

Both hashing and indexing are use to partition data on some pre- defined formula. But I am unable to understand the key difference between the two.

As in hashing we are dividing the data on the basis of some key value pair, similarly in Indexing also we are dividing data on some pre defined values.

Can any one please help me out the difference between Hashing and Indexing, and how to decide whether to use hashing or Indexing.

Answer

Sergey Kalinichenko picture Sergey Kalinichenko · Dec 16, 2013

Hashing is a specific case of indexing:

Hashing vs. Indexing

Indexing is a general name for a process of partitioning intended at speeding up data look-ups. Indexing can partition the data set based on a value of a field or a combination of fields. It can also partition the data set based on a value of a function, called hash function, computed from the data in a field or a combination of fields. In this specific case, indexing is called data hashing.