- Prepare
- Databases
- OLAP
- OLAP Operation Types
- Discussions

# OLAP Operation Types

# OLAP Operation Types

+ 0 comments Hello, I have answered 3 times wrong, is there a chance to retry it again ? Thanks

+ 0 comments Just (4, 7, 3, 84, 160, 117)

+ 0 comments Group By ROLLUP produces a*((b+1)

*(c+1)) + 1 rows. This is because if we have ROLLUP(D1,D2,D3) we can decompose it to ROLLUP(D1,D2), that has a*(b+1) +1 rows, because we can think about it as the cartesian product between D1 and (D2 + NULL item), plus the NULL,NULL final row. So with ROLLUP(D1,D2,D3), we know that each D1 row can be grouped with b rows of D2, that is {(D1.1, D2.1),...,(D1.1,D2.b),....} but then, each D2.x row, can be combined with c rows of D3, that is {(D1.1, D2.1,D3.1),...,(D1.1,D2.b, D3.c),...}. But, we'll have for each D2 row also the tuple (D1.x, D2.y_, NULL), and for each D1 row the tuple (D1.x,NULL,NULL), that results in the a*[b*(c+1)+1]+1 final formula.with D1,D2,D3,D4 columns, and D4 with d distinct values, ROLLUP(D1,D2,D3,D4) generates a*[b*[c*(d+1)+1]+1] + 1 rows.

GROUP BY CUBE instead is the cartesian product of (a+1)

*(b+1)*(c+1), since (a+1), etc.. are all the current rows plus the NULL value.

+ 0 comments If attributes D1, D2, and D3 have n1, n2, and n3 different values respectively, and each possible combination of values appears at least once in the table DataPoints, the result sizes of the queries Q1, Q2, and Q3 can be specified as follows:

Q1: The result size of Q1 will be n1 * n2 * n3.

Q2: The result size of Q2 will be (n1 + 1) * (n2 + 1) * (n3 + 1).

Q3: The result size of Q3 will be (n1 + 1) * (n2 + 1) * (n3 + 1).

Therefore, the tuple that correctly specifies the result sizes of the queries Q1, Q2, and Q3 when n1=a, n2=b, and n3=c is (a, b, c, a * b * c, (a + 1) * (b + 1) * (c + 1), (a + 1) * (b + 1) * (c + 1)).

Sort 18 Discussions, By:

Please Login in order to post a comment