PPT Slide
- Bit map index:
- record values of sparse columns as a sequence of bits, one for each possible value
- bit vector: a vector indicating which records contain that value
- a collection of bit vectors for a column is called the bit map index for that column
- Bit vectors for column = sex:
- value r1 r2 r3 r4
- 10 1 1 0 1
- 01 0 0 1 0
- Bit vectors for column=rating:
- value r1 r2 r3 r4
- 10000 0 0 0 0
- 01000 0 0 0 0
- 00100 1 0 0 0
- 00010 0 0 0 1
- 00001 0 1 1 0
- Query: how many male customers
- take the first bit vector for sex
- do a bit-wise AND with the fifth vector
- count the number of 1s in resulting