Sei sulla pagina 1di 45

OLAP – On Line Analytical Processing

Session Objectives
People. Passion. Excellence

Objectives:

At the end of this session, you will be able to:


> Define On Line Analytical Processing
> Understand the need for OLAP and applications of OLAP in BI
> Describe the various OLAP solutions and Architecture
> Comparison of different OLAP architectures
> Evaluation parameters to be considered for selecting an OLAP tool

2
What is OLAP?
People. Passion. Excellence

> OLAP (On Line Analytical Processing) applications - designed for

online ad-hoc data access and analysis.

> Data organized into multiple dimensions.

> Access to analytical content such as time series and trend analysis

views and summary level information.

> A set of functionality that attempts to facilitate multidimensional

analysis.

> Offers drill-down, drill-across and slice and dice capabilities.

3
OLAP - Fast Analysis
People. Passion. Excellence

• On Line No piles of paper, please!

• Analytical Establish patterns

• Processing Data-based

• Fast Analysis of Shared Multidimensional

Information

4
Need for OLAP
People. Passion. Excellence

• Dimensions can we think in ?

E.g. analysis by branch, product, agent, year !!!

2 or 3

• Types of values we can handle ?

E.g. Sales, Profit, Cost

1 or 2

• How many levels can we handle ?

E.g. number of products we can analyze

5
Need for OLAP
People. Passion. Excellence

Many parameters affect a Measure (value)

e.g Sales influenced by product, region, time, distribution

channel, etc.,

Linear analysis = reports

Many totals are at one level

Difficult to identify the key parameters

6
OLAP in an Enterprise
People. Passion. Excellence

7
Uses of OLAP
People. Passion. Excellence

Departments:
• Finance

• Marketing

• Sales

• Manufacturing

Analytical Capabilities:

> Used by analysts and managers.

> Offers aggregated view of the data, such as total revenues by customer

profile, by product line, by geographical regions.

8
Functionality of OLAP Tools
People. Passion. Excellence

> Provides the decision support front-end for data warehousing.

> Advanced statistical, financial, and analytical calculations.

> Appropriate tools to access data from a relational database.

> Appropriate tools to access or manage multidimensional data.

9
Features of OLAP Applications
People. Passion. Excellence

OLAP analytical features

> Multi-dimensional views of data

> Calculation intensive capabilities

> Time intelligence

The OLAP Calculation engine in OLAP tools have a wide range of

built-in calculations such as:


> Ratios
> Time calculations
> Statistics
> Ranking
> Custom formulas/algorithms
> Forecasting and modeling

10
Evolution of OLAP
Star Schema
People. Passion. Excellence

> A Star Schema is a dimensional model created by mapping data


entities from operational systems
> It has a central table (fact table) that links all the other tables
(dimension tables) together
> Dimension: The same category of information. For example, year,
month, day, and week are all part of the Time Dimension.
> Measure: The property that can be summed or averaged using pre
computed aggregates.

12
Facts and Measures
People. Passion. Excellence

u e
e n Gros
e v s Marg
s R in
le Net Pro
f it
Sa
P ro st
fita Co
bili
ty

> Facts or Measures are the Key Performance Indicators


of an enterprise

> Factual data about the subject area

> Numeric, summarized

13
Dimension
People. Passion. Excellence

n ue
e ve ) What was sold ?
s R re
l e s u Whom was it sold to ?
Sa M e a When was it sold ?
(
Where was it sold ?

> Dimensions put measures in perspective

> What, when and where qualifiers to the measures

> Dimensions could be products, customers, time, geography etc.

14
Star Schema
People. Passion. Excellence

15
Star Schema Example
People. Passion. Excellence

16
Star Schema with Sample Data
People. Passion. Excellence

17
CUBE
People. Passion. Excellence

Cube
– Multi dimensional databases store information in the form of
cubes.
– A cube is a collection of facts and related dimensions stored
together in arrays.
Geography

Sales

HR

Time

Product
Basic Terminology of a Cube
People. Passion. Excellence

> Hierarchy: A hierarchy defines the navigating path for drilling up and drilling
down. All attributes in a hierarchy belong to the same dimension.
> Levels: These are organized into one or more hierarchies, typically from a
coarse-grained level (for example, Year) down to the most detailed one (for
example, Day).
> Members: The individual category values (for example, 2002 or 21Jan2002).
> Measures: These are the data values that are summarized and analyzed.
Examples of measures are sales figures or operational costs.
> Cells: These are the intersection of one member for every dimension and
store the data for measures.

19
Basic Terminology of a Cube
People. Passion. Excellence

> Dimensions consist of


Time
– Dimension Name

Level 2000
OfYEAR
1999 2001
– Level
– Hierarchy
Detail
Q3 Q4
QUARTER
Q1 Q2 Q3 Q4 Q1 Q2 – Member

20
Aggregates
People. Passion. Excellence

• Add up amounts for day 1


• In SQL: SELECT sum(amt) FROM SALE
WHERE date = 1

sale prodId storeId date amt


p1 s1 1 12
p2 s1 1 11
p1
p2
s3
s2
1
1
50
8
81
p1 s1 2 44
p1 s2 2 4

21
Aggregates
People. Passion. Excellence

• Add up amounts by day


• In SQL: SELECT date, sum(amt) FROM SALE
GROUP BY date

sale prodId storeId date amt


p1 s1 1 12
ans date sum
p2 s1 1 11
1 81
p1 s3 1 50
2 48
p2 s2 1 8
p1 s1 2 44
p1 s2 2 4

22
Another Example
People. Passion. Excellence

• Add up amounts by day, product


• In SQL: SELECT date, sum(amt) FROM SALE
GROUP BY date, prodId

sale prodId storeId date amt


p1 s1 1 12 sale prodId date amt
p2 s1 1 11 p1 1 62
p1 s3 1 50 p2 1 19
p2 s2 1 8
p1 s1 2 44 p1 2 48
p1 s2 2 4

rollup
drill-down

23
Aggregates
People. Passion. Excellence

> Operators: sum, count, max, min, median and avg


> “Having” clause
> Using dimension hierarchy
– average by region (within store)
– maximum by month (within date)

24
The MOLAP Cube
People. Passion. Excellence

Fact table view: Multi-dimensional cube:


sale prodId storeId amt
p1 s1 12 s1 s2 s3
p2 s1 11 p1 12 50
p1 s3 50 p2 11 8
p2 s2 8

dimensions = 2

25
3-D Cube
People. Passion. Excellence

Fact table view: Multi-dimensional cube:

sale prodId storeId date amt


p1 s1 1 12
p2 s1 1 11 s1 s2 s3
day 2
p1 s3 1 50 p1 44 4
p2 s2 1 8 p2 s1 s2 s3
p1 s1 2 44 day 1
p1 12 50
p1 s2 2 4 p2 11 8

dimensions = 3

26
Example
People. Passion. Excellence

roll-up to region
Dimensions:
e NY
or SF Time, Product, Store
St roll-up to brand
LA Attributes:
Product (upc, price, …)
Juice 10
Store …
Product

Milk 34
56

Coke
32
Hierarchies:
Cream
12 Product → Brand → …
Soap
Bread 56 roll-up to week Day → Week → Quarter
M T W Th F S S Store → Region → Country
Time
56 units of bread sold in LA on M

27
Cube Aggregation: Roll-up
People. Passion. Excellence

Example: computing sums


s1 s2 s3
day 2 ...
p1 44 4
p2 s1 s2 s3
day 1
p1 12 50
p2 11 8

s1 s2 s3
sum 67 12 50
s1 s2 s3
p1 56 4 50
p2 11 8
129
rollup sum
p1 110
drill-down p2 19

28
Aggregation Using Hierarchies
People. Passion. Excellence

s1 s2 s3
day 2
p1 44 4 store
p2 s1 s2 s3
day 1
p1 12 50
p2 11 8
region

country

region A region B
p1 56 54
p2 11 8
(store s1 in Region A;
stores s2, s3 in Region B)

29
People. Passion. Excellence
Slicing
• In SQL: SELECT * FROM SALE WHERE date = 1

s1 s2 s3
day 2
p1 44 4
p2 s1 s2 s3
day 1
p1 12 50
p2 11 8

TIME = day 1

s1 s2 s3
p1 12 50
p2 11 8

30
OLAP Solutions and Architecture
OLAP - Classification
People. Passion. Excellence

Online Analytical Processing (OLAP) can be done on:

> Relational databases


> Multidimensional databases

OLAP products are grouped into three categories:

> Relational OLAP (ROLAP)


> Multidimensional OLAP (MOLAP)
> Hybrid OLAP (HOLAP)

32
MOLAP
People. Passion. Excellence

Brand

p
ou
Gr
e
Ag
Geography

• Multi-dimensional OLAP
• MOLAP is a technology which uses a multi-dimensional database
that stores data as n-dimensional cube

33
Architecture of MOLAP
People. Passion. Excellence

i c al
non-live connection C rit
e
•Used for Siz
updating the ube
MOLAP data cube
C LAN
only

Desktop Systems
Data Mart Server
MOLAP Client
•RDBMS MOLAP Server
Tools
•Connectivity Middleware
•MDDBMS/Data Cube
•MOLAP Application
Router
Firewall
Issues: Intranet
Internet
• Size of Data Cube
Thin Clients
• Cubes deployment
•WWW Browser
• Size of Update Data Set

34
MOLAP Products
People. Passion. Excellence

• Oracle's Oracle Express Server

• Cognos - Powerplay Transformer

• Essbase (Hyperion Software)

• Holos (Seagate Software)

35
Architecture of ROLAP
People. Passion. Excellence

LAN

Data Mart Server ROLAP Server Desktop Systems


•RDBMS •ROLAP Application ROLAP Client
•Connectivity Middleware Tools

Router /
Issues: Firewall
• Aggregate Awareness Intranet
• Response Time Internet
Thin Clients
•Network Capacity
•WWW Browser

36
ROLAP Products
People. Passion. Excellence

• Brio Query Enterprise

• Business Objects

• Metacube

• DSS Server

• Information Advantage

37
Architecture of HOLAP
People. Passion. Excellence

LAN

MOLAP Server
ROLAP Server Desktop Systems
•MDDBMS/Data Cube HOLAP Client
•MOLAP Application •ROLAP Application
Tools

Router/Fire
wall
Issues:
•Cube elements
•Integration with

RDBMS

38
HOLAP Products
People. Passion. Excellence

• Holos (Seagate Software)

• Microsoft SQL Server OLAP Services

• Pilot Software's Pilot Decision Support Suite

• SAS

39
MOLAP Vs ROLAP
Comparison of Architectures
People. Passion. Excellence

Architectural MOLAP ROLAP


Features
Number of Dimensions Ten or Less Unlimited

Support for Large number Limited support Good


of users

Scalability Poor Good

Complex Easier to achieve Difficult to achieve


Multidimensional analysis

Volume of Data storage Up to 50 GB Hundreds of


Gigabytes and
Terabytes

Storage of Information Through cubes SQL result sets

User Interface & Good Normal


functionality

Common access NA SQL


language

Nature of Data Stores summarized Stores Detailed as


data well as summarized
data

41
Strength and Weakness of MOLAP/ROLAP
People. Passion. Excellence

Parameters MOLAP ROLAP


Application design Essentially the It uses two-
definition of dimensional tables
dimensional model that are stored in
and calculation rules RDBMSs. (Data is
stored in Star
schema or Snow
flake schema.)

Aggregation techniques Measures are pre- Summary tables are


calculated and stored implemented in the
at each hierarchy relational database
summary level during
load time

Multidimensional Drill down, Drill up, Drill down, Drill up,


analysis Drill across and Slicing and Dicing
Slicing /Dicing
Query performance Instant response Slower

Value added functions Supports complex Limited value added


functions like functions
%change, ranking etc.,

User – defined Calculated from cubes Calculated (On the


calculations fly )from the
database

42
Strength and Weakness of MOLAP/ROLAP
People. Passion. Excellence

Parameters MOLAP ROLAP


Processing Over head High Low
for large input data sets
Support for frequent Cannot handle Suitable for frequent
updates frequent update of updates
cubes
Resource requirements High Low

Industry standard No current standards SQL standard

Access to the database The databases have Provides access


through ODBC proprietary API and do through ODBC
not provide access
through ODBC.

43
Session Summary
People. Passion. Excellence

In this session, We have

> Understood the need for OLAP and significance of Multidimensional


analysis in a Data Warehouse.

> Discussed about the evolution of OLAP.

> Explained architectures, characteristics as well as the merits and

demerits of various OLAP solutions.

44
Thank you

Potrebbero piacerti anche