Comparision of Indexing and Hashing
Comparision of Indexing and Hashing
Indexing:
Indexing, as name suggests, is a technique or mechanism generally used to
speed up access of data. Index is basically a type of data structure that is used
to locate and access data in database table quickly. Indexes can easily be
developed or created using one or more columns of database table.
2.Hashing:
Hashing, as name suggests, is a technique or mechanism that uses hash
functions with search keys as parameters to generate address of data record. It
calculates direct location of data record on disk without using index structure. A
good hash functions only uses one-way hashing algorithm and hash cannot be
converted back into original key. In simple words, it is a process of converting
given key into another value known as hash value or simply hash.
Difference between Indexing and Hashing in DBMS :
INDEXING HASHING
It offers faster search and retrieval It is faster than searching arrays and
of data to users, helps to reduce lists, provides more flexible and reliable
table space, makes it possible to method of data retrieval rather than any
quickly retrieve or fetch data, can be other data structure, can be used for
used for sorting, etc. comparing two files for quality, etc.
Its main purpose is to provide basis Its main purpose is to use math problem
for both rapid random lookups and to organize data into easily searchable
efficient access of ordered records. buckets.