Beruflich Dokumente
Kultur Dokumente
Prepared By
Amit Sharma
Hyperion/OBIEE Trainer
arnhyperion.wordpress.com
Aloo_a2@yahoo.com
Review
Architecture
Characteristics
Relational OLAP
Multidimensional OLAP
ROLAP VS. MOLAP
Star Schema
Fact table
Dimensions
Drilling Down & Roll up
Slicing & Dicing
Fact
• Definition : Facts are numeric measurements
(values) that represent a specific business activity.
• Facts are stored in a FACT table I.e. the center of
the star schema.
• Facts are used in business data analysis, are units,
cost, prices and revenues
• Example: sales figures are numeric measurements
that represent product and/or service sales.
Fact Table
Central table
– Mostly raw numeric items
– Narrow rows, a few columns at most
– Large number of rows (millions to a
billion)
– Access via dimensions
Fact Table
Definition :The centralized table in a star schema is called as
FACT table, that contains facts and connected to dimensions.
A fact table typically has two types of columns:
Contain facts and
Foreign keys to dimension tables.
The primary key of a fact table is usually a composite key that
is made up of all of its foreign keys.
• A fact table might contain either detail level facts or facts
that have been aggregated (fact tables that contain
aggregated facts are often instead called summary tables). A
fact table usually contains facts with the same level of
aggregation.
Dimension
• Definition : Qualifying characteristics that provide additional
perspective to a given fact.
• Example: sales might be compared by product from region to
region and from one time period to the next.
• Here sales have product, location and time dimensions.
• Such dimensions are stored in DIMENSIONAL TABLE.
Dimension Tables
• Definition: The dimensions of the fact table are further
described with dimension tables
• Fact table:
Sales (Market_id, Product_Id, Time_Id, Sales_Amt)
• Dimension Tables:
Market (Market_Id, City, State, Region)
Product (Product_Id, Name, Category, Price)
Time (Time_Id, Week, Month, Quarter)
What is Star Schema?
all all
Product_Line->Product_Family->Product_Category->Product_Name
Multidimensional Data
• Sales volume as a function of
product, month,Dimensions:
and region Product, Location, Tim
Hierarchical summarization paths
on
gi
Office Day
Month
A Sample Data Cube
Date Total annual sales
2Qtr of TV in U.S.A.
1Qtr 3Qtr 4Qtr sum
t
uc
TV
od
PC U.S.A
Pr
VCR
sum
Country
Canada
Mexico
sum
Date A Sample Data Cube
t
uc
TV
Country
sum Total annual sales
Pr
PC
VCR U.S.A of TV in U.S.A.
sum
Canada
Mexico
sum
Essbase
Sales Manager Qtr1 Qtr2 Qtr3 Qtr4
Sales Sales Sales Sales
John New York 1000 1000 1000 1000
California 200 200 200 200
Texas 63446 63446 63446 63446
Ohio 6633 6633 6633 6633
Illnois 3466 3466 3466 3466
Qtr1 Qtr2 Qtr3 Qtr4
Mac New York
California
Texas
Ohio 300
Illnois
Star Schema
• A single fact table and for each dimension one dimension table
• Does not capture hierarchies directly
• Example of Star Schema: Figure 1.6
In the example, sales fact table is connected to
dimensions location, product, time and organization. It
shows that data can be sliced across all dimensions and
again it is possible for the data to be aggregated across
multiple dimensions. "Sales dollar" in sales fact table can
be calculated across all dimensions independently or in a
combined manner which is explained below.
• For example, to find the total sales (over time) of each product in
each market, we might use
P2 6003 2402 …
P3 4503 3 …
P4 7503 7000 …
P5 … … …
Typical OLAP Operations
• Roll up (drill-up): summarize data
– by climbing up hierarchy or by dimension reduction
• Drill down (roll down): reverse of roll-up
– from higher level summary to lower level summary or
detailed data, or introducing new dimensions
• Slice and dice:
– project and select
• Pivot (rotate):
– reorient the cube, visualization, 3D to series of 2D planes.
• Other operations
– drill across: involving (across) more than one fact table
– drill through: through the bottom level of the cube to its
back-end relational tables (using SQL)
Drilling Down and Rolling Up
• Some dimension tables form an aggregation hierarchy
Market_Id → City → State → Region
• Executing a series of queries that moves down a hierarchy (e.g.,
from aggregation over regions to that over states) is called
drilling down
– Requires the use of the fact table or information more specific
than the requested aggregation (e.g., cities)
• Executing a series of queries that moves up the hierarchy (e.g.,
from states to regions) is called rolling up
Drilling Down
Drilling down on market: from Region to State
Sales (Market_Id, Product_Id, Time_Id, Sales_Amt)
Market (Market_Id, City, State, Region)
• SELECT S.Product_Id, M.Region, SUM (S.Sales_Amt)
FROM Sales S, Market M
WHERE M.Market_Id = S.Market_Id
GROUP BY S.Product_Id, M.Region
Sales Channel
Region
Drill-Down
Country
State
Roll Up
Location Address
Sales Representative
Low-level
Details
“Slicing and Dicing”
Household
Telecomm ns
o
e gi
R Europe
Video
Far East
Audio India
branch_key
branch location
location_key
location_key
branch_key
units_sold street
branch_name
city_key city
branch_type
dollars_sold
city_key
avg_sales city
province_or_street
Measures country
Questions??
Prepared By
Amit Sharma
Hyperion/OBIEE Trainer
learnhyperion.wordpress.com
Aloo_a2@yahoo.com