You are on page 1of 13

DATA WAREHOUSE

AND DATA MINING


Topic –
Bitmap Index
SUBMITTED TO – SAMEER SAXENA
SUBMITTED BY – GURLEEN KAUR
AIM
 DEFINITION
 PURPOSE OF BITMAP INDEX
 CONDITIONS TO CREATE BITMAP INDEX
 HOW DATA IS STORED IN BITMAP INDEX
 UTILITY OF BITMAP INDEX
 ADVANTAGES
 DISADVANTAGES
 DIFFERENCE B/W BITMAP INDEX AND B-TREE INDEX
DEFINITION
Bitmap Indexing is a special type of database indexing that uses
bitmaps. This technique is used for huge databases, when column is of
low cardinality and these columns are most frequently used in the
query
PURPOSE OF BITMAP INDEX
Expedite the performance of queries - Bitmap index and B-Tree index share the same
performance which is to expedite the performance of queries. For example-You
have a table in your warehouse or database that has millions of rows and there are
certain few queries that access few columns on a regular basis in your reports . You
have to go and index those columns so that you get performance benefits in your
queries .
CONDITIONS TO CREATE BITMAP
INDEX
1. Low Cardinality column
2. Bitmap index can’t handle multiple concurrent updates it leads to serious dead
lock issues.
 Create a bitmap index only if the data is modified by a single process at a time.
 Don’t create on oltp systems
 Suitable for large data warehouse with no parallel updates
HOW DATA IS STORED IN BITMAP
INDEX
ID GENDER STATUS
1 MALE SINGLE
2 FEMALE DIVORCED
3 MALE MARRIED
4 FEMALE DIVORCED
5 MALE MARRIED
6 FEMALE SINGLE
7 FEMALE SINGLE
HOW DATA IS STORED IN BITMAP
INDEX (contd.)
MALE FEMALE
1 0
0 1
1 0
0 1
1 0
0 1
0 1

BITMAP INDEX ON GENDER COLUMN


HOW DATA IS STORED IN BITMAP
INDEX (contd.)
SINGLE MARRIED DIVORCED
1 0 0
0 0 1
0 1 0
0 0 1
0 1 0
1 0 0
1 0 0

BITMAP INDEX ON STATUS COLUMN


UTILITY OF BITMAP INDEX

 Very helpful in data warehouse

 Helps in aggregation
ADVANTAGES
 It gives faster result and is less time consuming
 It covers less space as compared to other indexes like BTree
 It is efficient even if table has a huge number of records .
 It is simple and easy to understand
DISADVANTAGES
 A large number of records is difficult to maintain .
 It has to be modified throughout if the user enters a new record which is time
consuming and difficult
 Bitmap indexes is not suitable for tables with fewer records .
 Multiple insertions / updating /deletion operation from different users can cause
deadlock
DIFFERENCE B/W
BITMAP INDEX & B-TREE INDEX

1. Bitmap index is different in the manner how they store data.


 B-Tree Index stores data in tree format
 Bitmap Index stores data in two dimensional arrays .
2. Cardinality
 B-Tree Index are created on high cardinality columns.
 Bitmap Index are created on low cardinality columns .
THANK YOU

You might also like