17
OLAP Cubes Ming-Nu Lee

OLAP Cubes - cs.sfu.ca

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: OLAP Cubes - cs.sfu.ca

OLAP CubesMing-Nu Lee

Page 2: OLAP Cubes - cs.sfu.ca

OLAP

(Online Analytical Processing)

Performs multidimensional analysis of business data

Provides capability for complex calculations, trend analysis, and sophisticated

modelling

Foundation of many kinds of business applications

Page 3: OLAP Cubes - cs.sfu.ca

OLAP Cube

Multidimensional database

Method of storing data in a multidimensional form

Optimized for data warehouse and OLAP apps

Structure:

Data(measures) categorized by dimensions

Dimension as a hierarchy, set of parent-child relationships

Not exactly a “cube”

Page 4: OLAP Cubes - cs.sfu.ca

Schema

1) Star Schema

• Every dimension is represented

with only one dimension table

• Dimension table has attributes and

is joined to the fact table using a

foreign key

• Dimension table not joined to each

other

• Dimension tables are not

normalized

• Easy to understand and provides

optimal disk usage

Page 5: OLAP Cubes - cs.sfu.ca

Schema

1) Snowflake Schema

• Dimension tables are normalized

• Uses smaller disk space

• Easier to implement

• Query performance reduced

• Maintenance increased

Page 6: OLAP Cubes - cs.sfu.ca

Dimension Members

Identifies a data item’s position and description within a dimension

Two types of dimension members

1) Detailed members

• Lowest level of members

• Has no child members

• Stores values at members intersections which are stored as fact data

2) Aggregate members

• Parent member that is the total or sum of child members

• A level above other members

Page 7: OLAP Cubes - cs.sfu.ca

Fact Data

Data values described by a company’s business activities

Exist at Member intersection points

Aggregation of transactions integrated from a RDBMS, or result of Hierarchy or

cube formula calculation

Page 8: OLAP Cubes - cs.sfu.ca

Operations

Slice

Dice

Roll-up (Drill up)

Roll-down (Drill down)

Pivot

Page 9: OLAP Cubes - cs.sfu.ca

Slice

The act of picking a rectangular subset of a

cube by choosing a value for one of its

dimensions

Page 10: OLAP Cubes - cs.sfu.ca

Dice

Similar to slice, but it allows analyst to pick

specific values of multiple dimensions which

produces a subcube

Page 11: OLAP Cubes - cs.sfu.ca

Roll-Up

(Drill up)

Also known as consolidation or aggregation

1) Reducing dimensions

2) Climbing up concept hierarchy

Page 12: OLAP Cubes - cs.sfu.ca

Roll-Down

(Drill Down)

Fragment data into smaller parts

Opposite of roll-up

1) Increasing a dimension

2) Moving down the concept hierarchy

Page 13: OLAP Cubes - cs.sfu.ca

Pivot

Provides a different look or presentation of

data by rotating the cube or axes

Page 14: OLAP Cubes - cs.sfu.ca

Multidimensional Expressions

(MDX)

Originally developed in the late 1990s

Language for expressing analytical queries

Extension of SQL language

A MDX expression returns a multi-dimensional result set that consist of axis

data and cell data

Page 15: OLAP Cubes - cs.sfu.ca

Advantages

Information and calculations are consistent in an OLAP cube

“What if” scenarios can be quickly created and analyzed

Broad or specific terms can be easily searched for in the database

Slice and dice cube data by various dimensions, measures and filters

Good for analyzing time series

Page 16: OLAP Cubes - cs.sfu.ca

Disadvantages

Data must be organized into a star or snowflake schema which hard to

implement and administer

A single OLAP cube cannot have a large number of dimensions

Transactional data unable to be accessed with OLAP cubes

Modification of a cube requires a full update of the cube

Page 17: OLAP Cubes - cs.sfu.ca

References

What is OLAP (Online Analytical Processing): Cube, Operations & Types, https://www.guru99.com/online-analytical-processing.html#8

(2017). Data Cube Operations – SQL Queries, https://blogs.perficient.com/2017/08/02/data-cube-operations-sql-queries/

http://olap.com/

https://en.wikipedia.org/wiki/OLAP_cube

Rouse, M. (2012). OLAP cube, https://searchdatamanagement.techtarget.com/definition/OLAP-cube

Rouse, M. (2012). multidimensional expressions (MDX), https://searchsqlserver.techtarget.com/definition/multidimensional-expressions-MDX

Star and SnowFlake Schema in Data Warehousing, https://www.guru99.com/star-snowflake-data-warehousing.html