Saturday, 22 March 2014

what Difference between B-tree(Balanced tree) and Bitmap index ?

1) B-tree indexes index entry points to a single row
Where as,In case of Bitmap indexes index entry point to multiple rows.
2)B-tree indexes are more suitable for high cardinality columns(i.e the number of distinct values is large compared to the number of table rows) eg:ename.Where as,Bitmap indexes are more suitable for low carnality columns(i.e the number of distinct values is small compared to the number of table rows) eg:Male or female status for gender.
3)B-tree indexes are used in OLTP environment (eg:Banking Database where there will be huge trasactions taking place).Where as,Bitmap indexes are primarily designed for data warehousing or environments in which queries reference many columns in an ad hoc fashion(eg:Datawarehouse Database of huge size).
4)In the B-tree indexes actually values are stored in leaves(which is a part of B-tree index structure).
Where as,In Bitmap indexes the values are stored in Bits(0's and 1's).
5)In the OLTP environment where there are lot of DML activities are happening it is more advantageous to use B-tree indexes.Where as,In the OLAP(Datawarehousing) environment or DSS(Decision support system) where we have to perform read only(selecting the data) activities Bitmap indexes are more recommended.


Thanks
Ur's Hari

No comments:

Post a Comment