Professional Documents
Culture Documents
OLAP Operations
time_key
time item item_key
time_key Sales Fact Table item_key shipper_key
day item_name
day_of_the_week brand from_location
month
time_key
type
quarter supplier_type
item_key to_location
year
branch_key dollars_cost
branch location_key location units_shipped
branch_key location_key
branch_name units_sold
street shipper
branch_type
dollars_sold city shipper_key
province_or_state shipper_name
avg_sales country location_key
Measures shipper_type
1 0 … 0
Jian Pei: CMPT 741/459 Data Warehousing and OLAP (2) 11
Using Bitmap to Count
• Shcount[] contains the number of bits in the
entry subscript
– Example: shcount[01100101]=4
count = 0;
for (i = 0; i < SHNUM; i++)
count += shcount[B[i]];
A1 A2 … A100 A1 A2 … A100
x1 x2 … x100 x1 x2 … x100
… … … … … … … …
z1 z2 … z100 z1 z2 … z100