You are on page 1of 4

EXPERIMENT 3

AIM: Implementation of OLAP operations: Slice, Dice, Rollup, Drilldown, and Pivot based on
experiment 1 case study.

THEORY: OLAP applies complex queries to large amounts of historical data, aggregated from
OLTPdatabases and other sources, for data mining, analytics, and business intelligence
projects. In OLAP, the emphasis is on response time to these complex queries. Each query
involves one or more columns of data aggregated from many rows. Examples include
year-over-year financial performance or marketing lead generation trends. OLAP databases and
data warehouses allow analysts and decision-makers to use custom reporting tools to turn data
into information. Query failure in OLAP does not interrupt or delay transaction processing for
customers, but it can delay or impact the accuracy of business intelligence insights

Drill down: In drill-down operation, the less detailed data is converted into highly detailed data.
It can be done by:
● Moving down in the concept hierarchy
● Adding a new dimension

Roll up: It is just the opposite of the drill-down operation. It performs aggregation on the OLAP
cube. It can be done by:
● Climbing up in the concept hierarchy
● Reducing the dimensions

Dice: It selects a sub-cube from the OLAP cube by selecting two or more dimensions. In the
cube given in the overview section, a sub-cube is selected by selecting the dimensions with the
criteria

Slice: It selects a single dimension from the OLAP cube which results in a new sub-cube
creation.

Pivot: It is also known as rotation operation as it rotates the current view to get a new view of
the representation.
CODE AND OUTPUT:

CREATE TABLE university (grade varchar(10), cid int, iid int, semid int, sid int, FOREIGN
KEY(cid) REFERENCES course(course_id), FOREIGN KEY(iid) REFERENCES
instructor(instruct_id), FOREIGN KEY(semid) REFERENCES sem(sem_id), FOREIGN KEY(sid)
REFERENCES student(student_id))
ROLL UP:
SELECT student_name, course_name, COUNT(grade) FROM student s, course c, university u WHERE
u.sid=s.student_id and u.cid=c.course_id group BY student_name, course_name;
SLICE:

SELECT student_name, course_name, grade FROM student s, course c, university u WHERE


u.sid=s.student_id and u.cid=c.course_id AND student_id=1

DICE:

SELECT student_name AS 'STUDENT', course_name AS 'COURSE', grade AS 'GRADE' FROM student


s, course c, university u WHERE u.sid=s.student_id and u.cid=c.course_id AND student_id=1 OR
student_ID=2 AND course_name='DWM' or course_name='IP';

CONCLUSION: From this experiment, I can conclude that OLAP enables one to organize
data in a multidimensional model that makes it easy for business users to understand
the data and to use it in a business context, such as a budget.

You might also like