Slideshow:
|
Answer:
123456789012
===========================
Bitmap index for age = 50 = 001110000010
Bitmap index for salary = 100 = 000100000000
-----------------------
AND: 000100000000
Record #4 !!!
|
|
|
Solution:
Bitmap index for age:
Value 123456789012
------------------------------
25 100000001000
30 000000010000
45 010000000100
50 001110000010 <----- These people !!!
60 000000000001
70 000001000000
85 000000100000
Records: 3, 4, 5 and 11
|
|
Solution:
Bitmap index for age:
Value 123456789012
------------------------------
25 100000001000
30 000000010000
45 010000000100 45 ≤ age ≤ 50
50 001110000010
60 000000000001
70 000001000000
85 000000100000
Or value = 011110000110
|