OLAP Cubes Ming-Nu Lee 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 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” 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 Schema
• Dimension tables are normalized
• Uses smaller disk space
• Easier to implement
• Query performance reduced
• Maintenance increased 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 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 Operations
Slice
Dice
Roll-up (Drill up)
Roll-down (Drill down)
Pivot Slice The act of picking a rectangular subset of a cube by choosing a value for one of its dimensions Dice Similar to slice, but it allows analyst to pick specific values of multiple dimensions which produces a subcube Roll-Up (Drill up) Also known as consolidation or aggregation 1) Reducing dimensions 2) Climbing up concept hierarchy Roll-Down (Drill Down) Fragment data into smaller parts Opposite of roll-up 1) Increasing a dimension 2) Moving down the concept hierarchy Pivot Provides a different look or presentation of data by rotating the cube or axes 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 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 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 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