Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 11

Bitmap indexes

Peer Learning Sessions (PLS)

Presented By :
Asif Nazir Bhat
Roll No 222211007

Feb 2023
NIT Delhi 0
1. Bitmap Indexing
2. Bitmap index Structure
•Advantages 
3. Uses of Bitmap indexing
4. Deletion and insertion of record
5. Implementation of bitmap operations
- Intersection Operation
- Union Operation
- Negation Operation

NIT Delhi *
02
Bitmap Indexing


A bitmap index is a data structure that uses bitmaps to represent the values in a
column of a table.
Bitmap is used to efficiently handle large amounts of data in databases or data
warehouses.
In bitmap indexing, a bitmap is created for each distinct value of a column in a
table or dataset.
Bitmap indexes are used in data warehousing to improve query performance.
These bitmaps are then used to quickly answer queries that involve filtering or
grouping by one or more of the columns in the table.

NIT Delhi *
Bitmap Index Structure
The word 'bitmap' comprises of 'bit' and 'map'. A bit is the smallest unit of data in a computer system.
A map means organizing things. Thus, a bitmap is simply mapping of bits in the form of an array. In a
relation, each attribute carries one bitmap for its value. A bitmap has sufficient bits for numbering each
record in the block.

For example, consider a relation Student_record where we wish to find out the female and male
students whose score in English is greater than 40. The bitmaps for gender are given in the below
image.
Bitmap Indexing

NIT Delhi *
Comparison Between Bitmap and B-tree

NIT Delhi *
Resut/ Outcome

NIT Delhi *
Uses of Bitmap Indexing
There are following uses of Bitmap indexing:
It enables the user to read and select only the required records or data from a relation.

It is useful for making selections on multiple keys.

Bitmap indexing helps in counting the number of records falling under the selection requirement.
It means it makes it easy to count those tuples which are under the selection criteria of the user.

Bitmap indexing is useful as well as necessary in performing queries for data analysis.

The size of a single bitmap is smaller than 1 percent. Thus, its size is smaller than a relation. For
example, a record in a relation is of 100 Bytes, and the relation occupies 1% of memory space.
Consequently, a single bitmap occupies 1/8th of the space occupied by the relation.

NIT Delhi *
Deletion and Insertion of Records
Deleting a record from the relation disturbs the sequence of records. The record which gets
deleted creates space or gaps in between other records.

Filling such gaps is possible by shifting other records, but it is an expensive task.

Existence bitmap is a solution to this problem. By storing an existence bitmap, we can


recognize the deleted records.

In existence bitmap, if a record does not exist, its bit value will be 0-otherwise 1.

Insertion of records is cost-effective. It is because the insertion of a record does not affect
the sequence of other records.

Either by merely replacing the deleted records or by appending records to the EOF (end of
file), a user can proceed to insert the records

NIT Delhi *
C

NIT Delhi *

You might also like