Microsoft PowerPoint - OLAP Fundamentals
description
Transcript of Microsoft PowerPoint - OLAP Fundamentals
![Page 1: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/1.jpg)
![Page 2: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/2.jpg)
Oracle OLAP Option
Fred LouisSolution Architect, Ohio Valley
![Page 3: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/3.jpg)
BI/DW PLATFORM
Data Warehousing, OLAP, Data Mining, Spatial
![Page 4: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/4.jpg)
Reporting Spectrum
ProductionReporting
End-UserReporting
Ad-hoc Query &Analysis
Oracle Reports Oracle BI
XML Publisher
![Page 5: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/5.jpg)
Reporting Spectrum
Historical DataReal-time Data
Oracle Reports
Oracle BI
XML Publisher
BAM
![Page 6: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/6.jpg)
OLAP at Oracle
� Over thirty years of innovation yields a complete and compelling OLAP platform
– Express, the first multidimensional database
– Oracle 9iR2, the first (and only) relational-multidimensional database
– Oracle 10g � The first (and only) Grid capable OLAP platform
� All new administration
� All new data access tools
� All new applications
![Page 7: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/7.jpg)
The role of OLAP in the Database …
![Page 8: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/8.jpg)
Why Multidimensional?
� Calculations– Models, forecasts, statistics, custom functions, etc.
� Multidimensional models– End user model – provides structure and context
– Physical model - facilitates ease of expression
� Transaction Model– Session isolated, read repeatable
– Supports what-if/planning applications
� Ad-Hoc Query Optimization– Efficient build and solve processes
– Uniform performance across entire logical model
– Excellent runtime calculation performance
![Page 9: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/9.jpg)
Dimensional Model
� Promotes ad-hoc navigation and calculation definition– Easily understood by end users
� “Sales by product and customer over time”
– Embedded business rules
� Users don’t need to understand how all data is calculated
– Provides context for query and calculation definition
� Users don’t need to understand the physical model
![Page 10: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/10.jpg)
Dimensional ModelProvides both Structure and Business Rules
Time
Product
Customer
Sales
Aggregation Rules
All
ocati
on
Ru
les
Forecast Rules
Product Share
Sales Year to Date
Profit
Average Selling Price
Item
Brand
Manufacturer
Month Quarter Year
![Page 11: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/11.jpg)
Transaction Model
� Session isolated, read repeatable transaction model
– Session level DDL
– Session level DML
� Supports applications such as budgeting and demand planning
![Page 12: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/12.jpg)
Ad-Hoc Query Optimization
� Predictable query environment– Predefined reports
– Predefined calculations
– Less exploration of data
� Ad-hoc query environment– Users define reports
– Users access any data
– Users define calculations
– More users amplify this effect
![Page 13: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/13.jpg)
Ad-Hoc Query Optimization
� Multidimensional data types
– Array based measure storage
– Measures are prejoined to dimensions
– Measures share dimensions
– Optimizations for sparse data
– Summary management in multidimensional engine
– Computational scalability
– Partitioning and parallel processing
![Page 14: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/14.jpg)
Analytic Workspace Manger and Administration …
How do we get started?
![Page 15: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/15.jpg)
Architecture
Discoverer OLAP,Excel add-in,
BI Beans
API for AW Administration (Java)
OLAP DML for API implementation
CalculationBean
OLAPI
<XML>
Sources
![Page 16: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/16.jpg)
![Page 17: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/17.jpg)
Dimensional ModelProvides both Structure and Business Rules
Time
Product
Customer
Sales
Aggregation Rules
All
ocati
on
Ru
les
Forecast Rules
Product Share
Sales Year to Date
Profit
Average Selling Price
Item
Family
Class
Month Quarter Year
Chan
nel
![Page 18: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/18.jpg)
With OLAP
WithoutOLAP
Slower Query
Faster Query
Query Performance
Ad-Hoc Nature of Application and Query Patterns
Less Ad-HocPredictable QueriesSimple Calculations
More Ad-HocUnpredictable Query Patterns
Sophisticated Calculations
Query Performance
![Page 19: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/19.jpg)
With OLAP
WithoutOLAP
More Time
Less Time
Time To Prepare Data for Query
Ad-Hoc Nature of Application and Query Patterns
Less Ad-HocPredictable QueriesSimple Calculations
More Ad-HocUnpredictable Query Patterns
Sophisticated Calculations
Preparation Time
![Page 20: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/20.jpg)
Fragmentation
– Types of fragmentation
� Subject specific data marts
- Sales, finance, human resources, etc.
� Geographically fragmented data
- Americas, Europe, Asia Pacific, etc.
� Database technology fragmentation
- Relational and multidimensional
� Tools induced fragmentation
- Separate tools for relational and multidimensional databases
![Page 21: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/21.jpg)
Fragmentation
� What if you had …
– Five subject areas
– Five geographic regions
– Relational and multidimensional analysis of each
– Separate tools for both relational and multidimensional databases
![Page 22: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/22.jpg)
Fragmentation
� You would have …
– 50 separate databases to manage
– Latency and synchronization problems
– Business rules in each database and in each tool
� You would not have a single, unified view of the enterprise with
– A single version of the data
– Consistency of business rules
![Page 23: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/23.jpg)
Geographic Fragmentation
![Page 24: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/24.jpg)
Technology Fragmentation
![Page 25: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/25.jpg)
Tools Fragmentation
Enterprise Reporting
Ad-Hoc Reporting OLAP Ad-Hoc Spreadsheets
Relational Data Warehouse
Multidimensional Database
Sources
Warehouse ETLProcess
Replication data to Multidimensional
database
Profit = A+B-C Profit = B+C+D Profit = A+C+D Profit = A+C+D-E
![Page 26: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/26.jpg)
Traditional BI PlatformsResults in Fragmentation
ToolsMultidimensional
DatabasesData Warehouse
Relational Tools
OLAP APIs
SQL
DataReplication
Process
MultidimensionalTools
Business Rules
Business Rules
Business Rules
Business Rules
Data
Data
![Page 27: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/27.jpg)
Stand-alone OLAPFragmented data and business rules
Profit = A+B-C Profit = B+C+D Profit = A+C+D Profit = A+C+D-E
![Page 28: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/28.jpg)
Traditional BI PlatformsResults in spreadsheet-level integration
Profit = A+C+D-ESPREADSHEET
![Page 29: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/29.jpg)
Integrated RDBMS-MDDS …
![Page 30: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/30.jpg)
OLAP Platform
DatabaseOLAP Option: Query Analysis Planning
OracleDiscoverer
EnterprisePlanning &Budgeting
Oracle ExcelAdd-In
Business Intelligence Beans
CustomApplications
OLAP API
SQL
Third PartyTools
Third PartyApplications
Oracle Warehouse Builder
![Page 31: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/31.jpg)
Integrated RDBMS-MDDSOpen access and consistency
Oracle Discoverer
Oracle Business Intelligence
BeansExpress Add-inOracle Reports Third Party
Profit = A+C+D-E
![Page 32: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/32.jpg)
What is an Analytic Workspace?
![Page 33: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/33.jpg)
Analytic Workspace
� Container for collections of multidimensional data types
– Usually organized by subject matter
� Sales, marketing, finance, HR, etc.
– Contains one or many ‘cubes’
– Can contain data, formulas, stored procedures, etc.
– Stored in Oracle data files
– Determines the scope of an OLAP transaction
![Page 34: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/34.jpg)
Analytic Workspaces
FormulasFormulasRuntime calculations (aggregations, user/DBA/developer defined calculations)
DataData Dimension members, attributes, hierarchies and fact data
OLAP DML code for solved calculationsOLAP DML code for solved calculationsOLAP DML programming code for aggregations, allocations, forecasts, models and other calculations
OLAP DML code for data loadingOLAP DML code for data loadingOLAP DML programming code for loading data from relational tables and flat files
Typical contents of an analytic workspace
SQL IMPORT SELECT SALES FROM
SALES_FACT INO SALES_DATA
DEFINE SALES_AGGMAP AGGMAP <TIME CUST_PRO_DEMO_CHAN_PROM
<CUSTOMER PRODUCT DEMOGRAPHIC CHANNEL PROMOTION>>
relation parentrel_time precompute
(NA)
relation parentrel_product precompute
(levelrel_product 'TOTAL_PRODUCT' 'SUBCATEGORY')
relation parentrel_customer precompute
(levelrel_customer 'TOTAL_CUSTOMER' 'COUNTRY' 'STATE')
aggregate sales quantity cost using sales_aggmap
DEFINE QTY_PCTCHG_PP FORMULA DECIMAL
<TIME PROMOTION CHANNEL DEMOGRAPHIC PRODUCT CUSTOMER>
EQ lagpct(quantity,1,time,nostatus)*100
DEFINE SHARE_SALES_CHAN FORMULA DECIMAL
<TIME PROMOTION CHANNEL DEMOGRAPHIC PRODUCT CUSTOMER>
EQ (sales/sales(channel 'Total')) * 100
![Page 35: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/35.jpg)
Analytic Workspaces
Concept of the “solved cube”
Runtime Calculation Definitions• Dynamic aggregations, measures, members, forecasts, models, etc.
Data•Dimension members, measures, stored aggregations
Cubes is presented to application as fully solved
Select time_id, product_id,
customer_id, sales, product_share
from sales_view
where product_level = 'BRAND‘
and month_level = 'MONTH‘
and customer_id = 'TOTAL CUSTOMER';
Client applications asks for data without expressing the calculation rules
![Page 36: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/36.jpg)
Storage Model
SALES
UNITS
COST
FORECAST_SALES
FORECAST_UNITS
AW$SALES
SALES
Oracle Data Files
Objects in analytic workspace are stored in separate rows in the AW$ table
![Page 37: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/37.jpg)
Storage Model
SALES
UNITS
COST
FORECAST_SALES
FORECAST_UNITS
AW$SALES
SALES
Oracle Data Files
AW$ table can be partitioned using table partitioning
![Page 38: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/38.jpg)
Query Methods …
![Page 39: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/39.jpg)
Query Methods
Generic SQL Generic SQL
ApplicationApplication
OCI or JDBC
Select … from
View/table
Relational Multidimensional
OLAP API OLAP API
ApplicationApplication
SQL GeneratorSQL GeneratorSelect … from
View/table
OLAP API
KPRB
OCI or JDBC
Select … from
OLAP_TABLE
‘OLAP aware’ SQL ‘OLAP aware’ SQL
ApplicationApplication
•DBMS_AW.EXECUTE
•DBMS_AW.INTERP
•DBMS_AW.INTERPCLOB
Select … from
view
RDBMS ViewRDBMS View
Table FunctionTable Function
![Page 40: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/40.jpg)
Query Methods
Generic SQL Generic SQL
ApplicationApplication
OCI or JDBC
Select … from
View/table
Relational Multidimensional
OLAP API OLAP API
ApplicationApplication
SQL GeneratorSQL GeneratorSelect … from
View/table
OLAP API
KPRB
OCI or JDBC
Select … from
OLAP_TABLE
‘OLAP aware’ SQL ‘OLAP aware’ SQL
ApplicationApplication
•DBMS_AW.EXECUTE
•DBMS_AW.INTERP
•DBMS_AW.INTERPCLOB
Select … from
view
RDBMS ViewRDBMS View
Table FunctionTable Function
![Page 41: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/41.jpg)
SQL Query Processing
APPLICATION
RELATIONAL ENGINE
SELECT Statement
OLAP_TABLE
Select list and WHEREclause predicates
Returns data inmultidimensional
format
Returns data inRow format
Returns data throughOCI or JDBC
MULTIDIMENSIONAL ENGINE
OLAP DML commands
Aggregation andcalculation
SQL filter evaluated here
SQL filter evaluated here
![Page 42: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/42.jpg)
SQL MODEL
� New MODEL clause provides syntax for the “custom dimension member” like functionality
select prod, year, amount
from sales
model dimension by (prod, year) measures (amount)
(
amount[any, any] = 1.1*amount[cv(prod), cv(year) - 1]
amount['Games', 2002] = amount['Games', 2001] + amount['Games', 2000],
amount['Accessories', 2002] = 1.2* sum(amount)['Accessories', for year in
(1998, 1999, 2000, 2001)]
)
![Page 43: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/43.jpg)
SQL Query Processing
APPLICATION
RELATIONAL ENGINE
SELECT Statement
OLAP_TABLE
Select list and WHEREclause predicates
Returns data inmultidimensional
format
Returns data inRow format
Returns data throughOCI or JDBC
MULTIDIMENSIONAL ENGINE
OLAP DML commands
Aggregation andcalculation
Data flows directly to hash table
Hash Table
Spreadsheet functions are evaluated by relational engine
![Page 44: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/44.jpg)
Query Equivalency
� RDBMS feature
– Allows DBA to indicate that a table or view could have been created using specified SQL
– Allows query re-write into views over analytic workspaces
– Simplifies administration of SQL based tools
![Page 45: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/45.jpg)
Query Rewrite into Analytic Workspaces
View with fact
detail
View with summary
data
SQL client
Analytic Workspace
1) Application queries summary data by issue SQL against detail fact table with GROUP BY
2) Query is automatically rewritten to use summary view
3) Data is accessed from analytic workspace
![Page 46: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/46.jpg)
Query Performance
As fast as as Express
Average Response Times
0.00
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09
Random
Cell Pick
Percent
Rank
Pct Chg
Pct Rank
Top 10 Pct Chg
Top 10 Pct
Mkt Share
Top /
Bottom 10
Express Server 6.3
9i OLAP option
![Page 47: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/47.jpg)
SQL Examples …
![Page 48: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/48.jpg)
A Time Dimension View
CREATE OR REPLACE VIEW time_view AS
SELECT *
FROM TABLE(OLAP_TABLE('global DURATION SESSION',
'',
'',
'DIMENSION member_id as varchar2(10) from time WITH
HIERARCHY parent_id as varchar2(10) from
time_parentrel(time_hierlist ''CALENDAR_YEAR'')
INHIERARCHY TIME_INHIER
FAMILYREL
MONTH_ID as varchar(10),
QUARTER_ID as varchar(10),
YEAR_ID as varchar(10)
FROM
time_familyrel(time_levellist ''MONTH''),
time_familyrel(time_levellist ''QUARTER''),
time_familyrel(time_levellist ''YEAR'')
ATTRIBUTE short_desc as varchar2(10) FROM time_short_description
ATTRIBUTE long_desc as varchar2(10) FROM time_long_description
ATTRIBUTE time_span as number FROM time_time_span
ATTRIBUTE end_date as date FROM time_end_date
ATTRIBUTE month_of_quarter as varchar2(16) FROM time_month_of_quarter
ATTRIBUTE month_of_year as varchar2(16) FROM time_month_of_year
ATTRIBUTE quarter_of_year as varchar2(16) FROM time_quarter_of_year'
));
![Page 49: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/49.jpg)
A Time Dimension View
SQL> desc time_et_view;
Name Null? Type
----------------------------------------- -------- ---------------------------
MEMBER_ID VARCHAR2(10)
PARENT_ID VARCHAR2(10)
MONTH_ID VARCHAR2(10)
QUARTER_ID VARCHAR2(10)
YEAR_ID VARCHAR2(10)
SHORT_DESC VARCHAR2(10)
LONG_DESC VARCHAR2(10)
TIME_SPAN NUMBER
END_DATE DATE
MONTH_OF_QUARTER VARCHAR2(16)
MONTH_OF_YEAR VARCHAR2(16)
QUARTER_OF_YEAR VARCHAR2(16)
The view
![Page 50: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/50.jpg)
A Time Dimension View
SQL> select member_id, long_desc, quarter_of_year
from time_et_view where parent_id = '102‘
and quarter_of_year in ('2','3')
order by end_date;
MEMBER_ID LONG_DESC QUARTER_OF_YEAR
---------- ---------- ---------------
99 Q2-03 2
100 Q3-03 3
Query using standard SQL
![Page 51: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/51.jpg)
Simple Sales Fact View
/* A simple fact view */
CREATE OR REPLACE VIEW units_cube_star_fact_view AS
SELECT *
FROM TABLE(OLAP_TABLE('global DURATION SESSION',
'',
'',
'DIMENSION time_id as varchar2(20) from time
DIMENSION customer_id as varchar2(20) from customer
DIMENSION product_id as varchar2(20) from product
DIMENSION channel_id as varchar2(20) from channel
MEASURE sales as number FROM units_cube_sales
MEASURE units as number FROM units_cube_units
MEASURE extended_cost as number FROM units_cube_extended_cost
ROW2CELL olap_calc'
));
![Page 52: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/52.jpg)
Simple Sales Fact View
/* A simple select with olap_expression */
select
time_id,
customer_id,
product_id,
channel_id,
sales,
units,
extended_cost,
olap_expression(olap_calc,'lag(units_cube_sales,1,time,status)') as SALES_PRIOR_PRIOD
from units_cube_star_fact_view
where
time_id in ('1','2','3','4','85','102','119','145')
and customer_id = 'TOTAL_CUSTOMER_1'
and product_id = 'TOTAL_PRODUCT_1'
and channel_id = 'TOTAL_CHANNEL_1';
![Page 53: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/53.jpg)
Fact View with Dimensional Attributes
CREATE OR REPLACE VIEW units_cube_attr_fact_view AS
SELECT *
FROM TABLE(OLAP_TABLE('global DURATION SESSION',
'',
'',
'DIMENSION time_id as varchar2(20) from time with
ATTRIBUTE time_level as varchar2(15) from time_levelrel
ATTRIBUTE time_parent as varchar2(15) from time_parentrel
ATTRIBUTE time_dsc as varchar2(15) from time_long_description
DIMENSION customer_id as varchar2(20) from customer with
ATTRIBUTE customer_level as varchar2(15) from customer_levelrel
ATTRIBUTE customer_parent as varchar2(20) from customer_parentrel
ATTRIBUTE customer_dsc as varchar2(25) from customer_long_description
DIMENSION product_id as varchar2(20) from product with
ATTRIBUTE product_level as varchar2(15) from product_levelrel
ATTRIBUTE product_parent as varchar2(15) from product_parentrel
ATTRIBUTE product_dsc as varchar2(25) from product_long_description
DIMENSION channel_id as varchar2(20) from channel with
ATTRIBUTE channel_level as varchar2(15) from channel_levelrel
ATTRIBUTE channel_parent as varchar2(15) from channel_parentrel
ATTRIBUTE channel_dsc as varchar2(25) from channel_long_description
MEASURE sales as number FROM units_cube_sales
MEASURE units as number FROM units_cube_units
MEASURE extended_cost as number FROM units_cube_extended_cost
ROW2CELL olap_calc'
));
![Page 54: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/54.jpg)
Fact View with Dimensional Attributesselect
time_id,
time_dsc,
customer_id,
customer_dsc,
product_id,
product_dsc,
channel_id,
channel_dsc,
sales,
units,
extended_cost
from
units_cube_attr_fact_view
where
time_parent = '102'
and customer_level = 'TOTAL_CUSTOMER'
and product_level = 'TOTAL_PRODUCT'
and channel_level = 'TOTAL_CHANNEL';
![Page 55: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/55.jpg)
Fact View with Dimensional AttributesTIME_ID TIME_DSC SALES UNITS EXTENDED_COST
-------------------- --------------- ---------- ---------- -------------
100 Q3-03 33636358.5 140931 31494036.7
101 Q4-03 36446069.5 145716 34329834.6
98 Q1-03 26946411 110104 24982346.3
99 Q2-03 33247675.7 137318 30739600.7
![Page 56: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/56.jpg)
Oracle 10g OLAP …
![Page 57: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/57.jpg)
Oracle10g OLAP Highlights
� Support for large multidimensional data sets
� Administration
� Query interfaces
![Page 58: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/58.jpg)
Large Multidimensional Data Sets
� Physical storage model enhancements
� MULTI attach mode
� Partitioning
� Parallelism
� Aggregation from formulas
� Indexing optimizations
� Real Application Clusters and Grid Computing
![Page 59: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/59.jpg)
9i Release 2 Storage ModelAW$ table
AW$SALES
SALES Oracle Data FileSALESAW$ Table
Analytic Workspace data is stored in tables as LOB data type
![Page 60: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/60.jpg)
Oracle10g Storage Model
SALES
UNITS
COST
FORECAST_SALES
FORECAST_UNITS
AW$SALES
SALES
Oracle Data Files
AW$ table can be partitioned using table partitioning
![Page 61: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/61.jpg)
MULTI Attach Mode
� 10g MULTI attach mode allows multiple sessions to attach to the analytic workspace read-write
� Use separate sessions to
– Parallelize data loading tasks
– Aggregate data
– Allocate data
– Solve models
– Forecast data
– Etc
![Page 62: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/62.jpg)
Partitioned Variables
� Engine level partitioning of variable objects in the analytic workspace
� Each partition becomes a row in the AW$ table
� Partitioning methods
– RANGE
– LIST
– CONCAT
![Page 63: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/63.jpg)
Partitioned Variables
� RANGE partitioning
– Partitions based on a range of dimension members
Customers less than 1000
Customers less than 2000
Customers less than 3000
Customers less than 4000
Customers less than 5000
Sales
![Page 64: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/64.jpg)
Partitioned Variables
� LIST partitioning
– Partitions based on a list of named members
<‘JAN03’,’FEB03’,’MAR03’>
<‘APR03’,’MAY03’,’JUN03’>
<‘JUL03’,’AUG03’,SEP03’>
<‘OCT03’,’NOV03’,’DEC03’>
<‘JAN04’,’FEB04’,’MAR04’>
Sales
![Page 65: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/65.jpg)
Compressed Cubes
� New storage format
� Optimized data storage for very sparse data sets
– Large, highly dimensioned models
– Extremely sparse data
![Page 66: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/66.jpg)
Aggregation
� AGGREGATE_FROM
– Derives aggregate level data from calculations at leaf level
– Eliminates need to persist calculated data at leaf level
![Page 67: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/67.jpg)
Aggregation SourcesTraditional Method
UNIT_PRICE at Item and Month levels
SALES at Item and Month levels SALES = UNITS_SOLD * UNIT_PRICE
AGGREGATE SALESUSING SALES_AGGMAP
Traditional method of storing data at leaf levels from the results of a computation
SALES at summary levels
UNITS at Item and Month levels
UNITS at summary levels
![Page 68: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/68.jpg)
Aggregation SourcesAGGREGATE_FROM
UNIT_PRICE at Item and Month levels
SALES_FORMULA
SALES at summary levels
SALES_FORMULA eqUNITS_SOLD * UNIT_PRICE
Aggregate from SALES_FORMULA
Using AGGREGATE FROM to aggregate from a formulaeliminates ETL step and reduces size of database
UNITS at Item and Month levels
UNITS at summary levels
![Page 69: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/69.jpg)
Analytic Workspace Manger and Administration …
![Page 70: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/70.jpg)
Administration
� New Java and XML based administrative interfaces
� Major upgrade to administrative GUI tools
� Simplified administrative processes
![Page 71: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/71.jpg)
Administrative Interfaces
� Object oriented DDL/DML via Java and XML based APIs
– Fully abstracts logical dimensional model from physical design
– Supports “data immersive” administrative experience
– Used by Analytic Workspace Manager and Oracle Warehouse Builder
![Page 72: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/72.jpg)
Analytic Workspace Manager
� All new GUI for analytic workspace administration
– Designed for the ‘data dabbler’
– Dimensional modeling
– Flexible data source mapping
– Emphasis on data generation
![Page 73: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/73.jpg)
Analytic Workspace Manager
� Purpose
– Quickly define and build analytic workspaces
� Appeals to DBA and LoB power user cube designers, and support SCs during PoCs
� Quickly get SCs to the value add of embellishing the AW with computation and presentation
� Provide all-GUI experience/demonstration
– Support both the Database as vendor neutral BI platform and Oracle BI stack
� Presented as general AW administrative tool
![Page 74: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/74.jpg)
Analytic Workspace Manager
� Define logical dimensional model
� Implement physical model in analytic workspace
� Map to relational data sources
� Lifecycle management
� Templates
![Page 75: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/75.jpg)
Analytic Workspace Manager
� Dimensional modeling from an end-user perspective
– Dimensions
– Cubes
– Custom measures
– Aggregations
![Page 76: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/76.jpg)
Analytic Workspace Manager
� Implement model in analytic workspace
– OLAP option automatically builds an efficient analytic workspace based on the logical model
� Automatically uses partitioning, parallelism, compressed composite/cube, aggregations
� Eliminates the need to program using the OLAP DML for general cube construction
![Page 77: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/77.jpg)
Analytic Workspace Manager
� Mapping to relational sources
– Data source can be a relational object or OLAP DML
– Supports wider variety of relational sources as compared to AWM 9.2
� Stars, snowflakes, network of tables
� Tables, views, dblinks, etc.
– Not an ETL tool, but compatible with Oracle Warehouse Builder
![Page 78: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/78.jpg)
Analytic Workspace Manager
� Manage analytic workspace throughout its lifecycle
– Data loading
– Automatically aggregates and calculates measures according to calculation rules
– Cube refresh and resolve
– Supports Oracle Job Queue
![Page 79: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/79.jpg)
Analytic Workspace Manager
� Templates– Save dimensions, cubes and measures to template files
– Create objects and AWs from templates
– Used to
� Share analytic workspace designs with Oracle Warehouse Builder, other users and with other applications
� Transfer object definitions to other schema or instances
� Persist object definitions outside database
� Place object definitions in source control
![Page 80: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/80.jpg)
Analytic Workspace Manager
� Roadmap: Product Release
– Mapping features
� Loading data at more than one level
� Mapping multiple fact tables to a cube
� Multi-part key mappings
![Page 81: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/81.jpg)
Analytic Workspace Manager
� Roadmap: Production Release
– Aggregation features
� Apply aggregation rules to individual measures
� Choose aggregation hierarchy
� Specify caching options
![Page 82: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/82.jpg)
Analytic Workspace Manager
� Roadmap: Post 10.1.0.4
– Calculation plans, with additional calculations
� Forecasts
� Allocations
� Models (systems of equations)
– View data via cross tab and graph
– Work off-line from database
� Design and deploy mode
![Page 83: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/83.jpg)
Analytic Workspace Manager
� Roadmap: Post 10.1.0.4
– Dimension maintenance
� Add/remove/rename dimension members
� Custom members
� Change child-parent relationships
– Data write back
� Change measure/fact data
– Member/cell level security (“PERMIT”)
- Can be implemented in OLAP DML
![Page 84: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/84.jpg)
Architecture
Discoverer OLAP,Excel add-in,
BI Beans
API for AW Administration (Java)
OLAP DML for API implementation
CalculationBean
OLAPI
<XML>
Sources
![Page 85: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/85.jpg)
![Page 86: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/86.jpg)
![Page 87: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/87.jpg)
Query Interfaces …
![Page 88: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/88.jpg)
Query Interfaces
� Simplification of SQL and OLAP API access structures
� SQL interface enhancements
![Page 89: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/89.jpg)
SQL and OLAP API Access
� Oracle10g simplified and hardens access structures
– SQL access
� Automatically generated ADTs
– OLAPI API access
� OLAPI APIs does not require predefined views
� All metadata read directly from the analytic workspace
![Page 90: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/90.jpg)
SQL Interface
� Application of relational filters to multidimensional data types
� SQL MODEL support
� Query rewrite over multidimensional data types
![Page 91: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/91.jpg)
Oracle Advantages
� Industrial strength calculation engine
� Elimination/reduction of data replication
� Computational scalability
� Concurrent user scalability
� Open, modern interfaces
� High availability
� Easer to manage
� Most complete BI/DW/OLAP product line
� Platform support
![Page 92: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/92.jpg)
Oracle is the only relational-multidimensional database
Single RDBMS-MDDS process
Single data store
Single metadata repository
Single set of management tools
Single security model
OLAP API and SQL interfaces
Oracle
Yes
Yes
Yes
Yes
Yes
Yes
IBM
No
No
No
No
No
No
Hyperion
No
No
No
No
No
No
Microsoft
No
No
No
No
No
No
![Page 93: Microsoft PowerPoint - OLAP Fundamentals](https://reader033.fdocuments.in/reader033/viewer/2022051210/54c6d9f64a7959dc018b458b/html5/thumbnails/93.jpg)