What is "Rollup" And "cube"? How does these different from "groupby"

Questions by ajeet_13   answers by ajeet_13

Showing Answers 1 - 2 of 2 Answers

Ajeet Singh

  • May 23rd, 2006
 

If this term is ROLAP-

Relational Online Analytial Processing. ROLAP is a flexible architecture that scales to meet the widest variety of DSS and OLAP needs. ROLAP architecture access data directly from data warehousing using SQL.

CUBE: a multi-dimensional representation of data in which the cells contain measure(eg; profit or commission) and the edges represent data dimensions by which the data may be reported.

Where as; Group By is a function caluse which is used to group the data, eg; AVG, COUNT, MIN, MAX, STDDEV, SUM, VARIANCE, etc.
Example usage: SELECT MIN(sal), MAX(sal), AVG(sal) from emp;

  Was this answer useful?  Yes

Ajeet Singh

  • May 23rd, 2006
 

 The ROLLUP is an extension to the GROUP BY caluse. the rollup operator can be used by report writes to extract statistics and summary information from results sets. the rollup operator creates groupings by moving in one directon, from right ot left, along the list of coumns specified in the group by clause. it then applies the aggregae function to these groupings.

the cube operator is an addintional switch in the GROUP BY clause in a select statement. the cube operator can be applied to all aggregate fuctions, inluding AVG, SUM , MAX, MIN, and COUNT. it is used to produce results sets that are typically used for cross-tabulat reports.

while ROLLUP produces only a fraction of possible subtotal combinations, cube produces subtotals for all possible combinations of groupings specified in the GROUP BY clause, and a grand total.

the grouping function can be used with either the CUBE or ROLLUP operator.

 using the GROUPING function, you can differentiate stored NULL values from NULL values created by ROLLUP or CUBE.

the GROUPING function returns 0 or 1. 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions