Index: Presented By-VISHAKHA CHANDRA (10030141082)
Index: Presented By-VISHAKHA CHANDRA (10030141082)
PRESENTED BY-
VISHAKHA CHANDRA(10030141082)
What is Index
Clustered
A clustered index is a special type of index that reorders the
way records in the table are physically stored.
Table can have only one clustered index.
A clustered index is analogous to a telephone directory, which
arranges data by last name.
Clustered Index
Non-clustered
A Nonclustered index is a special type of index in which the
logical order of the index does not match the physical stored
order of the rows on the disc.
The leaf nodes of a nonclustered index doesnot consist of the
data pages. Instead the leaf nodes contain index rows.
Per table there can be upto 249 nonclustered indexes.
A nonclustered index is analogous to an index in a textbook.
Types of index
Unique indexes
Unique indexes are indexes that help maintain data
integrity by ensuring that no two rows of data in a table
have identical key values. E.g. UNIQUE and PRIMARY
key.
Non-unique indexes
Non-unique indexes are used solely to improve query
performance by maintaining a sorted order of data values
that are used frequently.
Bi-directional indexes
Bi-directional indexes allow scans in both the forward and
reverse directions.
This option allows you to:
Facilitate MIN and MAX functions
Fetch previous keys
Eliminate the need for the database manager to create a
temporary table for the reverse scan
Eliminate redundant reverse order indexes
More types…
Bitmap index
Bitmap index is a special kind of index that stores the bulk of its data as bit
arrays(bitmaps) and answers most queries by performing bitwise logical
operations on these bitmaps.
Bitmap indexes have traditionally been considered to work well for data such
as gender, which has a small number of distinct values, for example male and
female.
Bitmap indexes are widely used in data warehousing environments.
Identifier Gender Female Male
1 Female 1 0
Bitmap
2 Male 0 1
3 Male 0 1
4 Unspecified 0 0
5 Female 1 0
Dense index
A dense index in databases is a file with pairs of keys and pointers
for every record in the data file.
Sparse index
A sparse index in databases is a file with pairs of keys and pointers
for every block in the data file(i.e. not all records).
Reverse index
A reverse key index reverses the key value before entering it in the
index.
E.g. the value 24538 becomes 83542 in the index.
Reverse key indexes have become particularly important in high
volume transaction processing system because they reduce
contention for index blocks.
B-Tree Indexing