Professional Documents
Culture Documents
Practical 02
Practical 02
2) Starting with the base cuboid [student, course, semester, instructor], what specific
OLAP operations (e.g., roll-up from semester to year) should you perform to list the
average grade of CS courses for each Big University student?
Answer
Roll-up on course from course_id to department.
Roll-up on student from student_id to university.
Dice on course, student with department ="CS" and university = "big-university"
Drill-down on student from university to student_name.
3) If each dimension has five levels (including all), such as “student < major < status <
university < all”, how many cuboids will this cube contain (including the base and
apex cuboids)?
Answer
Let,
Li=Number of level associated withdimesion i
Given,
Li=5−1=4
N=4 dimesion
For an n-dimensional data cube, the total number of cuboids that can be generated (including
the cuboids generated by climbing up the hierarchies along each dimension) is:
n
Total number of cuboids=∏ ( Li +1 )
i=1
4
Total number of cuboids=( 5+ 1 )
Total number of cuboids=625