A data cube has dimensions Time, Location and Product. The concept hierarchy for Time is Day Month Quarter, and for Location is Store City Zone. Product has no concept hierarchy. Each roll-up or drill-down operation acts on exactly one dimension, moving it one level along its hierarchy. The current view displays total sales for every combination (Day, Store, Product).
Assertion (A): The view displaying total sales for every combination (Month, City) can be obtained from the current view using exactly two operations, one roll-up and one slice.
Reason (R): A slice fixes a dimension to a single value and removes it from the view, whereas a roll-up only moves a dimension to a coarser level of its hierarchy.
Which of the following is correct?
D
Step-by-Step Solution
Insight: translate the target view into a list of axis-level changes first. Two axes must climb a hierarchy and one axis must disappear, so three operations are needed, not two.
Exam route: compare the source triple (Day, Store, Product) with the target (Month, City) axis by axis and count one operation per required change.
Learning route:
Step 1: Write the change required on each dimension.
Time: Day Month, one level up its hierarchy one roll-up.
Location: Store City, one level up its hierarchy one roll-up.
Product: present in the source, absent in the target this axis must be removed.
Step 2: Decide how Product can be removed. Product has no concept hierarchy, so no roll-up can coarsen it. The only operation that removes a dimension by fixing it to a single value is a slice. So Product needs one slice.
Step 3: Count. One roll-up on Time one roll-up on Location one slice on Product operations. Since each roll-up acts on exactly one dimension, one roll-up and one slice can never do all three jobs. Hence Assertion (A) is FALSE.
Step 4: Test Reason (R) on its own. A slice does fix a dimension to one value and drop it from the view, and a roll-up does only change the level of a dimension within its hierarchy without removing it. Both halves are correct, so Reason (R) is TRUE.
Step 5: Combine. A is false and R is true, which is option D.
The tempting wrong path: read "(Month, City)" as still carrying Product, or assume one roll-up can coarsen both hierarchies at once. Either reading makes the count come out as two and pushes you to option A. The break is in Step 1: Time and Location are two different dimensions, and the statement explicitly says one roll-up acts on one dimension only. Note also that R being true is exactly what defeats A — R says a roll-up cannot remove an axis, so the missing Product forces a separate slice.
Generalization: to price a view change, count hierarchy climbs per dimension plus one slice per dimension that must vanish.
Verification: apply the three operations forward. (Day, Store, Product) roll-up Time (Month, Store, Product) roll-up Location (Month, City, Product) slice Product (Month, City), which is exactly the target view, and no two-operation route reaches it.
Answer: A is false, but R is true (option D).