0% found this document useful (0 votes)
71 views3 pages

Comparision of Indexing and Hashing

The document explains the concepts of indexing and hashing in database management systems (DBMS). Indexing is a technique that speeds up data retrieval using a data structure, while hashing generates a direct address for data records using hash functions. The document also outlines the differences between the two methods, including their purposes, types, and suitability for different database sizes.

Uploaded by

Arundhathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views3 pages

Comparision of Indexing and Hashing

The document explains the concepts of indexing and hashing in database management systems (DBMS). Indexing is a technique that speeds up data retrieval using a data structure, while hashing generates a direct address for data records using hash functions. The document also outlines the differences between the two methods, including their purposes, types, and suitability for different database sizes.

Uploaded by

Arundhathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

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 is a technique that allows to It is a technique that allows to search


quickly retrieve records from location of desired data on disk without
database file. using index structure.

It is generally used to optimize or It is generally used to index and retrieve


increase performance of database items in database as it is faster to
simply by minimizing number of disk search that specific item using shorter
accesses that are required when a hashed key rather than using its original
query is processed. value.

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.

It is not considered best for large


databases and its good for small It is considered best for large
databases. databases.
Types of indexing includes ordered
indexing, primary indexing,
secondary indexing, clustered Types of hashing includes static and
indexing. dynamic hashing.

It uses mathematical functions known as


It uses data reference to hold hash function to calculate direct location
address of disk block. of records on disk.

It is important because it ensures data


It is important because it protects file integrity of files and messages, takes
and documents of large size variable length string or messages and
business organizations, and compresses and converts it into fixed
optimize performance of database. length value.

You might also like