Database 20130368 Supervised by Dr. Ghazi Al-Naymat Fall 2017-2018


Database II Project

Bitmap indexing

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!

order now



Abdelrhman Al-Abdallat

No. 20130368



Supervised by

Dr. Ghazi Al-Naymat


Fall 2017-2018





would like to thank the head of department of Computer Science My supervisor,
Dr. Ghazi Al-Naymat for his guidance, assistance, support and invaluable
criticism, for he has helped me in simplifying and clarifying difficulties I
would have faced. In addition, I am honored for the chance he has given me to
think beyond horizon and for opening my eyes to wider areas related to my
topic, Thank you for your support along the way.





growing of using internet is making interest especially for the researcher is
becoming more and more crucial to make faster and efficient DBMS. The problem
is that most of the queries in a large data are complex. Therefore, many
indexing techniques are created to speed up access to data within the tables.
The traditional B-Tree index technique, used in almost all the relational
databases, is still effective for one-dimensional database but it is becoming
increasingly ineffective in multidimensional databases because it involves many
dimension tables and also attributes and the queries on the data usually
involve conditions on small subsets of the attributes. One of the strategies
that handle this difficulty is Bitmap indexes. In this paper, I will describe
the Simple Bitmap Index technique

















Table of Contents
Abstract 3
Table of
figures. 4
Introduction. 6
Characteristic of Bitmap indexing. 6
Advantage of Bitmap Indexes. 6
Disadvantage of Bitmap
Indexes. 7
Bitmap index Design. 7
Basic Bitmap Index. 7
Encoding. 8
Binning. 9
Compression. 9
Conclusion. 9
References: 10
















Table of figures


Figure 1 Basic Bitmap Index Example. 6

Figure 2 Encoded Example. 7




























A bitmap
index is a special kind of database
index that
uses bitmaps, Oracle bitmap indexes are very different from
standard b-tree indexes , Bitmap Indexes were first introduced by O’Neil
and implemented in the Model 204 DBMS. The bitmap technique is largely used for
typical data warehouse applications, which are mainly characterized and Used by complex query
types and read-mostly environments that are more or less static.

In data warehouse
environments insert, delete or update operations are not common, therefore, the
bitmap index is coming up to optimizes the query performance rather than others.

Bitmap indexes
are used by DBMS to accelerate decision support queries. The main advantage of
Bitmap indexes is that complex logical selection operations can be performed
very quickly and faster than B-tree by applying low-cost Boolean operations
such as OR, AND, and NOT, this will reduce search space before going to the
primary source data.


Characteristic of Bitmap indexing


·       For columns with very few unique values (low

·       Columns that have low cardinality are
good candidates

·       Tables that have no or little
insert/update are good candidates

·       Stream of bits: each bit relates to a
column value in a single row of table


Advantage of Bitmap Indexes

The xmain
xadvantage xof
xthe xBitmap xindexesx
thatx arex
high xcompressedx
structure, which xwillx make xthex read xis
xreally xfast.
in xaddition, the
bitmap structure makes the systemx
mergex multiplex
indexes xtogetherx
for faster access to thex underlying

Compressed indexes are like a bitmapx indexes, x
its represent a trade-off between CPU and Disk usage. The compressed structure
is faster to read-only fromx disk but unfortunately it takes
additional CPU xcycles tox decompress for access
anx uncompressed

One belief
concerning bitmap indexes is that they are only suitable for indexing
low-cardinality data. This is not necessarilyx true, because byx compressingx the indexes in bitmap indexes, it can be used veryx successfully
forx indexingx columnsx with manyx millions ofx different


Disadvantage of Bitmap


The main disadvantage is the
modificationx on bitmap indexing which is really
dreadful, because itx
requires a huge dealx
work on behalf of the system whichx is worst than modification on B-tree index, x on other hand the overheadx on maintaining the bits is enormous.


Bitmap index Design


Basic Bitmap Index


Bitmap indices are one of the mostx efficient indexingx methods availablex for speeding up multi-dimensional
range queries
x for reading x only (projection),
the queries x are evaluated x with bitwise logical operations that
are well supported byx
computer hardware,” for xan
attribute with C distinct values, the basic bitmap index generates C
bitmaps with N bits each, where N is the number ofx records in the datax set. Each bit in a bitmap is set to
“1” if the attribute in the record is of a specific value x; otherwise the bit is set to “0””.

Figure 1 below
will demonstrate a simple bitmap index with 6 bitmaps. “Each bitmap represents
a distinct attribute value. For instance, the attribute value 3 is highlighted
to demonstrate the encoding. In this case, bitmap 3 is set to “1”, all other
bits on the same horizontal position are set to “0””.






The basic bitmap
index introduced above is also called equality encoded bitmap index
since each bitmap indicates whether or not an attribute x value x equals to the key. This x strategy x is x the most efficient x for equality x queries x such x as “temperature = 100.” Chan and Ioannidis
(1998; 1999) developed two other encodingx strategies that are called

range encoding and interval encoding. These
bitmap indices are optimized for one-sided and two-sided range queries,
respectively. An

example of a
one-sidedx range query is “pressure < 56.7". A two-sided range query, for instance, is "35.8 < pressure < 56.7".   A comparison of an equality-encodedx and range-encoded bitmapx index is given in Figure 2 (based on Chan & Ioannidis, 1999). Let us lookx at the encoding of value 2, which is highlightedx in the figure. For equality encoding, the thirdx bitmap is set to "1" (E2), whereas all other bits on the samex horizontal line are set to "0". For the range-encoded bitmap index, all bitsx between bitmap R2 and R8 are set to "1", the remainingx bits are set to "0". This encoding is very efficient for evaluatingx range queries. Consider, for instance, the query "A <= 4". In this case, at most one bitmap, namely bitmap R4, has to be accessed (scanned) forx processing the query. All bits that are set to "1" in this bitmap fulfill the query constraint. On the other handx, for the equality-encoded bitmapx index, the bitmaps E0 to E4 have to be ORed together (via the Boolean operator OR). This means thatx 5 bitmaps have to be accessed, as opposedx to only 1 bitmap for the case of range encoding. In short, range encodingx requires at most one bitmap scan for evaluating range queriesx, whereas equality encoding requires in the worst-case c/2 bitmap scans, where c corresponds to the number of xbitmaps. Since one bitmapx in range encoding contains only "1" s, this bitmapx is usually not stored. Therefore, there are only c-1 bitmaps in a range-encodedx index.   3.3       Binning     The binning is the simplest form of bitmap indices works well for xlow-cardinality attributes, such as gender.   The basic idea of binning is to construct a bitmap for a bin rather than for each distinct attribute value. This approachx disassociates the numberx of bitmaps from the attributex cardinality and allows one to construct a bitmap index of a xprescribed size, no matter how large the attribute cardinality is. A clear xadvantage of this approach is that it allows one to control the index size. However, it also introduces somex uncertainty in the answers if one only uses the index.   3.4       Compression   Compression is the third approach to reduce the size of bitmapx indices. Since each bitmap of the bitmap x index may be usedx separately from others, compressionx is typically applied on each individual bitmap. Compressionx is a well-researched topicx and efficient compression software packages are widely available. Even x though these general-purpose compressionx methods are effective in reducing x the size of bitmaps.       4        Conclusion   So, I can say thatx there is no basic index that is best suited for all applications. Each application has its own advantages or disadvantages. The Bitmap indexing works well in low cardinality but not forx high cardinalities; we canx use B-Tree for high cardinalities. Compressed Bitmap is a promising technique to overcome this problem. Nowadays, there are several fast algorithms forx evaluating Boolean operators on compressed bitmaps. Another issue is that we need also some other efficient encoding techniques to lower the number of logicalx operations.               References:     ·       Sirirut Vanichayobon Le Gruenwald. Indexing techniques for Data Warehouses' queries. The University of Oklahoma.   ·       Chee-Yong Chan and Yannis E. loannidis. Bitmap Index Design and Evaluation. University of Wisconsin-Madison   ·        Chan, C.-Y., & Ioannidis, Y.E. (1999). An Efficient Bitmap Encoding Scheme for Selection Queries, SIGMOD Conference, Philadelphia, Pennsylvania, USA, ACM Press.   ·     v


I'm Neil!

Would you like to get a custom essay? How about receiving a customized one?

Check it out