BITMAP INDEXES Sai Priya Rama Gopal SJSU ID : 007506408 Class ID: 125.

Slides:



Advertisements
Similar presentations
E LEMENTARY D ATA STRUCTURES. A RRAYS Sequence of elements of similar type. Elements are selected by integer subscripts. For example, signs: array[37:239]
Advertisements

9.5 Counting Subsets of a Set: Combinations
COMP 521 F10 Final Exam Review. 1. Which of the following is defined as a property or description of an entity. A. RelationB. Attribute C. DomainD. Selection.
Dr. Kalpakis CMSC 661, Principles of Database Systems Representing Data Elements [12]
The Assembly Language Level
Chapter 11 Indexing and Hashing (2) Yonsei University 2 nd Semester, 2013 Sanghyun Park.
Chapter 12 Memory Organization
Multidimensional Data. Many applications of databases are "geographic" = 2­dimensional data. Others involve large numbers of dimensions. Example: data.
Multidimensional Data Rtrees Bitmap indexes. R-Trees For “regions” (typically rectangles) but can represent points. Supports NN, “where­am­I” queries.
COMP 451/651 B-Trees Size and Lookup Chapter 1.
Bitmap Index Buddhika Madduma 22/03/2010 Web and Document Databases - ACS-7102.
CS 3850 Lecture 4 Data Type. Physical Data Types The primary data types are for modeling registers (reg) and wires (wire). The reg variables store the.
BTrees & Bitmap Indexes
Multiple-key indexes Index on one attribute provides pointer to an index on the other. If V is a value of the first attribute, then the index we reach.
Advanced Querying OLAP Part 2. Context OLAP systems for supporting decision making. Components: –Dimensions with hierarchies, –Measures, –Aggregation.
13.5 Representing Data Elements Fields, Records, Blocks Variable-length Data Modifying Records.
COMP 451/651 Multiple-key indexes
BITMAP INDEXES Parin Shah (Id :- 207). Introduction A bitmap index is a special kind of index that stores the bulk of its data as bit arrays (commonly.
Chapter 40 File System Implementation
Bitmap Indexes.
CS 255: Database System Principles slides: Variable length data and record By:- Arunesh Joshi( 107) Id: Cs257_107_ch13_13.7.
CSE Lectures 22 – Huffman codes
CHP - 9 File Structures. INTRODUCTION In some of the previous chapters, we have discussed representations of and operations on data structures. These.
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
C-Store: A Column-oriented DBMS Speaker: Zhu Xinjie Supervisor: Ben Kao.
 A databases is a collection of data organized to make it easy to search and easy to retrieve in a useful, usable form.
Signature files. Signature Files Important alternative to inverted indexes. Given a document, the signature is calculated as follows. - First, each word.
13.6 Representing Block and Record Addresses
Data : The Small Forwarding Table(SFT), In general, The small forwarding table is the compressed version of a trie. Since SFT organizes.
Bitmap Indices for Data Warehouse Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY.
ECE 250 Algorithms and Data Structures Douglas Wilhelm Harder, M.Math. LEL Department of Electrical and Computer Engineering University of Waterloo Waterloo,
Object Persistence (Data Base) Design Chapter 13.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 5 Arrays.
Nimesh Shah (nimesh.s) , Amit Bhawnani (amit.b)
Logic (continuation) Boolean Logic and Bit Operations.
Introduction to Database Systems1. 2 Basic Definitions Mini-world Some part of the real world about which data is stored in a database. Data Known facts.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Chapter 10 Designing the Files and Databases. SAD/CHAPTER 102 Learning Objectives Discuss the conversion from a logical data model to a physical database.
Sec 14.7 Bitmap Indexes Shabana Kazi. Introduction A bitmap index is a special kind of index that stores the bulk of its data as bit arrays (commonly.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 8 Arrays.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.6 Instructor: Lin Chen Sept 2013.
Chapter 5 Multidimensional Indexes. One dimensional index can be used to support multidimensional query. F1=‘abcd’ F2= 123‘abcd#123’
Data Manipulation, part two Introduction to computer, 2 nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information.
Review Sorting algorithms Selection Sort Insertion Sort Bubble Sort Merge Sort Quick Sort.
Tallahassee, Florida, 2016 COP5725 Advanced Database Systems Indexing Spring 2016.
Access Module Implementing a Database with Microsoft Access A Great Module on Your CD.
จัดทำโดย นายชนากานต์ สันติคุณาภรณ์ นายธฤษพงศ์ ศิริบูรณ์ นางสาวศุภาภรณ์ ถ่านคำ.
Chapter 11 Indexing And Hashing (1) Yonsei University 1 st Semester, 2016 Sanghyun Park.
Click to edit Master title style Click to edit Master text styles –Second level Third level –Fourth level »Fifth level 1 Fundamentals of Programming Most.
Introduction to programming in java Lecture 21 Arrays – Part 1.
Digital logic COMP214  Lecture 2 Dr. Sarah M.Eljack Chapter 1 1.
Multidimensional Access Structures COMP3017 Advanced Databases Dr Nicholas Gibbins –
LESSON 8: INTRODUCTION TO ARRAYS. Lesson 8: Introduction To Arrays Objectives: Write programs that handle collections of similar items. Declare array.
BITMAP INDEXES Barot Rushin (Id :- 108).
Chapter 5. Multidimensional Indexes
Module 11: File Structure
Indexing Structures for Files and Physical Database Design
CHP - 9 File Structures.
Multidimensional Access Structures
File organization and Indexing
Chapter 11: Indexing and Hashing
Lecture 15: Bitmap Indexes
Introduction To Programming Information Technology , 1’st Semester
I have the answer, so what was the question?
INDEXING.
Copyright © Cengage Learning. All rights reserved.
Appendix D: Network Model
Chapter 11: Indexing and Hashing
Presentation transcript:

BITMAP INDEXES Sai Priya Rama Gopal SJSU ID : Class ID: 125

Introduction A bitmap index is a special kind of index that stores the bulk of its data as bit arrays (commonly called "bitmaps"). A bitmap index is a special kind of index that stores the bulk of its data as bit arrays (commonly called "bitmaps"). It answers most queries by performing bitwise logical operations on these bitmaps. It answers most queries by performing bitwise logical operations on these bitmaps. The bitmap index is designed for cases where number of distinct values is low, in other words, the values repeat very frequently. The bitmap index is designed for cases where number of distinct values is low, in other words, the values repeat very frequently.

Example Suppose a file consists of records with two fields, F and G, of type integer and string, respectively. The current file has six records, numbered 1 through 6, with the following values in order: Suppose a file consists of records with two fields, F and G, of type integer and string, respectively. The current file has six records, numbered 1 through 6, with the following values in order: NoFG 130FOO 230BAR 340BAZ 450FOO 540BAR 630BAZ

Example (contd…) A bitmap index for the first field, F, would have three bit-vectors, each of length 6 as shown in the table. A bitmap index for the first field, F, would have three bit-vectors, each of length 6 as shown in the table. In each case, the 1's indicate in which records the corresponding string appears. In each case, the 1's indicate in which records the corresponding string appears. Table 2 Table 2 ValueVector

Example (contd…) A bitmap index for the first field, G, would have three bit-vectors, each of length 6 as shown in the table. A bitmap index for the first field, G, would have three bit-vectors, each of length 6 as shown in the table. In each case, the 1's indicate in which records the corresponding string appears. In each case, the 1's indicate in which records the corresponding string appears. Table 3 Table 3 ValueVector FOO BAR BAZ001001

Motivation for Bitmap Indexes Bitmap indexes can help answer range queries. Bitmap indexes can help answer range queries. Example: Example: Given is the data of a jewelry stores. The attributes considered are age and salary. Given is the data of a jewelry stores. The attributes considered are age and salary. Table 4 Table 4 NoAgeSalary

Motivation (contd…) A bitmap index for the first field Age, would have seven bit-vectors, each of length 12 as shown in the table. A bitmap index for the first field Age, would have seven bit-vectors, each of length 12 as shown in the table. In each case, the 1's indicate in which records the corresponding string appears. In each case, the 1's indicate in which records the corresponding string appears. Table 5 Table 5 ValueVector

Motivation (contd…) A bitmap index for the second field Salary, would have ten bit- vectors, each of length 12 as shown in the table. A bitmap index for the second field Salary, would have ten bit- vectors, each of length 12 as shown in the table. In each case, the 1's indicate in which records the corresponding string appears. In each case, the 1's indicate in which records the corresponding string appears. Table 5 ValueVector

Motivation (contd…) Suppose we want to find the jewelry buyers with an age in the range and a salary in the range Suppose we want to find the jewelry buyers with an age in the range and a salary in the range We first find the bit-vectors for the age values in this range; in this example there are only two: and , for 45 and 50, respectively. If we take their bitwise OR, we have a new bit-vector with 1 in position i if and only if the i th record has an age in the desired range. We first find the bit-vectors for the age values in this range; in this example there are only two: and , for 45 and 50, respectively. If we take their bitwise OR, we have a new bit-vector with 1 in position i if and only if the i th record has an age in the desired range. This bit-vector is This bit-vector is

Motivation (contd…) Next, we find the bit-vectors for the salaries between 100 and 200 thousand. Next, we find the bit-vectors for the salaries between 100 and 200 thousand. There are four, corresponding to salaries 100, 110, 120, and 140; their bitwise OR is There are four, corresponding to salaries 100, 110, 120, and 140; their bitwise OR is

Motivation (contd…) The last step is to take the bitwise AND of the two bit-vectors we calculated by OR. The last step is to take the bitwise AND of the two bit-vectors we calculated by OR. That is: That is: AND

Motivation (contd…) We thus find that only the fourth and fifth records, which are (50,100) and (50,120), are in the desired range. We thus find that only the fourth and fifth records, which are (50,100) and (50,120), are in the desired range.

Issues for Bitmap Indexes Managing Bitmap indexes Managing Bitmap indexes Memory requirement. Memory requirement.

Managing Bitmap indexes Finding Bit-Vectors Finding Bit-Vectors Finding Records Finding Records Handling modifications to the data file. Handling modifications to the data file. – Record numbers must remain fixed once assigned. – Changes to the data file require the bitmap index to change as well.