- Practice
- Databases
- OLAP
- OLAP Operation Types
- Discussions

# OLAP Operation Types

# OLAP Operation Types

sean1813 + 0 comments -- ROLLUP: a*b*c + (a*b) + (a) + 1 -- CUBE: a*b*c + (a*b + a*c + b*c) + (a+b+c) + 1

mittal_ankit91 + 0 comments correct answer is d((4, 7, 3, 84, 160, 117))

martius_eduardo + 0 comments Suppose attributes D1, D2, and D3 have n1, n2, and n3 DIFFERENT VALUES respectively

Only d has different values for n1, n2 and n3.

sweedal19 + 0 comments Simple explanation to this problem. https://github.com/andylamp/stanford_dbclass/tree/master/13%20-%20on-line%20analytical%20processing

Correct answer is : option D] (4, 7, 3, 84, 160, 117)

sanjeetjmp + 0 comments In this paticular question, is it possibe to solve this question verbally?

agrawalparth08 + 3 comments Can anyone explain how the cube and rollup work?

YellariMandapaka + 0 comments ROLL-UP:The roll-up operation also called drill-up or aggregation operation performs aggregation on a data cube, either by climbing up a concept hierarchy for a dimension or by climbing down a concept hierarchy i.e dimension reduction. It goes from less-detailed data to more-detailed data.

CUBE:OLAP cube is a method of storing data in a multidimensional form, generally for reporting purposes.

Aldo_Zelen + 1 comment ROLLUP

In addition to the regular aggregation results we expect from the GROUP BY clause, the ROLLUP extension produces group subtotals from right to left and a grand total. Lets say you have table with two columns a,b.

a = 1,2

b = 3,4

Regular aggregation is will return 4 rows (2x2)

1,3

1,4

2,3

2,4

Rollup will return SUBTOTALS for every row from the right plus one subtotal for all rows (like sum on no aggregation) . There would be 7 rows :

1,3

1,4

1,null

2,3

2,4

2,null

null,null

CUBE

In addition to the subtotals generated by the ROLLUP extension, the CUBE extension will generate subtotals for all combinations of the dimensions specified. If "n" is the number of columns listed in the CUBE, there will be 2n subtotal combinations.

Lets say you have table with two columns a,b.

a = 1,2

b = 3,4

Cube will return SUBTOTALS for every row in every direction plus one subtotal for all rows (like sum on no aggregation) . There would be 9 rows :

1,3

1,4

1,null

2,3

2,4

2,null

null,3

null,4

null,null

Sathiyaarumugam + 1 comment Thanks Aldo.

Can you please relate this to the actual problem and help me to understand how it comes to the solution D (4,7,3,84,160,117).

Appreciate your time..

Aldo_Zelen + 1 comment No problem, sorry for the late reply. The tuple must satisfy the equation :

a,b,c,

/* Aggregation number of rows */ a*b*c,

/* Cube number of rows */ a*b*c+a*b+b*c+a*c+a+b+c+1,

/* Rollup number of rows */ a*b*c+a+a*b+1

And only one answers satisfies this.

manu92gr + 1 comment Hello Aldo,

This is really helpful to understand,However I have one question about Rollup tuples count:- Intstead of a*b*c+a+a*b+1,it should be ,a*b*c+a+b+c+1

RaviPushkar + 0 comments I think it goes from smaller combination to bigger, like this:

/* Aggregation */ (a*b*c),

/* Cube */ 1+a+b+c+(a*b)+(b*c)+(c*a)+(a*b*c),

/* Rollup */ 1+a+(a*b)+(a*b*c)

william_lyons17 + 0 comments [deleted]

NIKHIL19113 + 1 comment the answer is option b

yashtrivedi7_yt + 0 comments This is not the right answer

No more comments

Sort 7 Discussions, By:

Please Login in order to post a comment