Presentation is loading. Please wait.

Presentation is loading. Please wait.

8 Copyright © 2009, Oracle. All rights reserved. Modeling Multidimensional OLAP Dimensions and Cubes.

Similar presentations


Presentation on theme: "8 Copyright © 2009, Oracle. All rights reserved. Modeling Multidimensional OLAP Dimensions and Cubes."— Presentation transcript:

1 8 Copyright © 2009, Oracle. All rights reserved. Modeling Multidimensional OLAP Dimensions and Cubes

2 Copyright © 2009, Oracle. All rights reserved. 8 - 2 Objectives After completing this lesson, you should be able to: Use Warehouse Builder MOLAP dimension modeling capabilities –Value-based and skip-level hierarchies –Default hierarchy for multidimensional query tools Use Warehouse Builder MOLAP cube modeling capabilities –Conformed dimensions –Defining multiple cubes using the same dimensions at different levels –Custom measures –Sparsity –Preaggregation

3 Copyright © 2009, Oracle. All rights reserved. 8 - 3 Lesson Agenda OLAP concepts: Introduction Multidimensional data model –Measures –Dimensions –Hierarchies –Levels Analytic workspace Oracle Database 11g OLAP Warehouse Builder MOLAP dimension modeling Warehouse Builder MOLAP cube modeling Deploying MOLAP mappings

4 Copyright © 2009, Oracle. All rights reserved. 8 - 4 What Is OLAP? OLAP stands for online analytical processing. Online: You have access to live data (rather than static data). Analytical: You can analyze your data for reporting. You can create reports that are: –Multidimensional –Calculation-rich –Supported by time-based analysis –Ideal for applications with unpredictable, ad hoc query requirements

5 Copyright © 2009, Oracle. All rights reserved. 8 - 5 Examining an OLAP Question An OLAP question is a multidimensional query, as in the following: “What was the percentage change in revenue for a grouping of our top 20% products one year ago over a rolling three-month time period compared to the current period this year, for each region of the world?” This is a simple business question, but the actual query can be quite complex.

6 Copyright © 2009, Oracle. All rights reserved. 8 - 6

7 Copyright © 2009, Oracle. All rights reserved. 8 - 7 Lesson Agenda OLAP concepts: Introduction Multidimensional data model –Measures –Dimensions –Hierarchies –Levels Analytic workspace Oracle Database 11g OLAP Warehouse Builder MOLAP dimension modeling Warehouse Builder MOLAP cube modeling Deploying MOLAP mappings

8 Copyright © 2009, Oracle. All rights reserved. 8 - 8 Sales dimensioned by product, customer, and time SALES cube ProductCustomer Time Multidimensional Data Types Data is stored in multidimensional cubes in the analytic workspace.

9 Copyright © 2009, Oracle. All rights reserved. 8 - 9 Implementing a Dimensional Data Model with Multidimensional Data Types You can use multidimensional data types when: Ad hoc usage patterns are unpredictable Query performance requirements are high The analytic requirements of the business include extended analytic, forecasting, and planning functionality Calculation requirements are more extensive A data model that supports what-if analysis is required

10 Copyright © 2009, Oracle. All rights reserved. 8 - 10 Dimensional Model The multidimensional logical model has the following elements: Measures Dimensions Hierarchies Levels Attributes

11 Copyright © 2009, Oracle. All rights reserved. 8 - 11 Measures Represent factual data (sometimes called “facts”; OWB groups measures in “cubes”) Are organized by one or more dimensions Populate the cells of a logical cube Can be numeric data, text, date, Boolean, and so on

12 Copyright © 2009, Oracle. All rights reserved. 8 - 12 Measure Types Measures are of two types: Stored measures: –Can store the result in a variable Calculated measures: –Can evaluate calculated data in a formula at query time StoredCalculated

13 Copyright © 2009, Oracle. All rights reserved. 8 - 13 Example of Measures in a Report Stored measure Calculated measure Crosstab report containing four measures:

14 Copyright © 2009, Oracle. All rights reserved. 8 - 14 Dimensions Dimensions: Form the “edges” of the measure Provide pointers to the actual cells inside the multidimensional measures Q1 Q2 Q3 Q4 Time Product Africa Europe Asia Americas SALES cube Regions Laptop Camcorder Camera Monitor

15 Copyright © 2009, Oracle. All rights reserved. 8 - 15 Example of Dimensions in a Report Product TimeCustomerChannel

16 Copyright © 2009, Oracle. All rights reserved. 8 - 16 Quiz Which of the following elements does the multidimensional logical model have? a.Measures b.Dimensions c.Columns d.Hierarchies e.Levels f.Attributes g.Tables

17 Copyright © 2009, Oracle. All rights reserved. 8 - 17 Hierarchies A hierarchy is a parent-child relationship among the members of a dimension. Hierarchies enable logical groupings of dimension members for the purposes of: –Navigation of data –Aggregation of measures –Allocation of data in a planning and budgeting application Dimensions usually have hierarchies.

18 Copyright © 2009, Oracle. All rights reserved. 8 - 18 Hierarchy: Example Hierarchies enable you to navigate from the lowest level to the highest level, or from the highest to the lowest. You can aggregate data from the lowest level to the highest level. Software Hardware PCs Laptops Monitors XMY Z L1L2L3 Y1Y2Y3 Total Product …

19 Copyright © 2009, Oracle. All rights reserved. 8 - 19 Levels All Products Category Subcategory Product Software Hardware PCs Laptops Monitors XMY Z L1L2L3 Y1Y2Y3 Total Product …

20 Copyright © 2009, Oracle. All rights reserved. 8 - 20 Types of Hierarchy Director VPAdmin Director VP President Day Month Quarter Year Level-based hierarchy Value-based hierarchy Director

21 Copyright © 2009, Oracle. All rights reserved. 8 - 21 Attributes Attributes provide descriptive information about the dimension members. Attributes are also useful when you are selecting dimension members for analysis: –Select the products whose color (attribute) is “Blue.” –Select the customers who have two children. –Select the promotions that are of type “Multipack.” –Select all time periods whose description contains “January.”

22 Copyright © 2009, Oracle. All rights reserved. 8 - 22 Attributes: Examples Total Karl Bruce Mary John Mary Manager Yellow sheets Red sheets White pillows Red shirt Green pants Red pants Blue shirt Product Yellow Red White Red Green Red Blue Color Sheets Pillows Bedding Women’s Men’s Kids’ Clothing SubcategoryCategory LevelsAttributes

23 Copyright © 2009, Oracle. All rights reserved. 8 - 23 Dimensional Model Summarized The multidimensional logical model has the following elements: Measures Dimensions –Hierarchies –Levels –Attributes Time Product Customer Item Brand Manufacturer MonthQuarterYear Sales Product Share Sales Year to Date Profit Average Selling Price

24 Copyright © 2009, Oracle. All rights reserved. 8 - 24 Lesson Agenda OLAP concepts: Introduction Multidimensional data model –Measures –Dimensions –Hierarchies –Levels Analytic workspace Oracle Database 11g OLAP Warehouse Builder MOLAP dimension modeling Warehouse Builder MOLAP cube modeling Deploying MOLAP mappings

25 Copyright © 2009, Oracle. All rights reserved. 8 - 25 Analytic Workspace Is a container that holds multidimensional data and objects Is designed for efficient processing of multidimensional calculations Supports advanced calculations and rapid query performance Can be temporary or persistent Is a special table (LOB) in a tablespace ( AW$tablename )

26 Copyright © 2009, Oracle. All rights reserved. 8 - 26 Analytic Workspace Analytic workspaces are built using: –Oracle Warehouse Builder –Analytic Workspace Manager (AWM 11g) –AW XML API (for 10g form AWs) –OLAP Java API (for 11g form AWs) –OLAP DML An analytic workspace can be accessed by: –Business intelligence tools from Oracle –Business intelligence tools from partners –SQL –OLAP APIs

27 Copyright © 2009, Oracle. All rights reserved. 8 - 27 Analytic Workspace: Creation and Maintenance Privileges To create and maintain an analytic workspace, you must have the following: OLAP_USER role (automatically granted to an OWB run- time user when that user is created with OWB Repository Assistant) SELECT privileges on the source schema tables Sufficient quota on the tablespace in which the workspace is created SELECT, INSERT, and UPDATE privileges for the analytic workspace

28 Copyright © 2009, Oracle. All rights reserved. 8 - 28 OLAP DML Is a very powerful, multidimensional-aware language that enables developers to truly exploit the power of the OLAP option Supports the definition of multidimensional calculations, including customized calculations unique to your organization Contains an inventory of several hundred analytic functions Enables application developers to extend the analytical capabilities of the AW Is accessible from the OWB Design Center user interface

29 Copyright © 2009, Oracle. All rights reserved. 8 - 29 Lesson Agenda OLAP concepts: Introduction Multidimensional data model –Measures –Dimensions –Hierarchies –Levels Analytic workspace Oracle Database 11g OLAP Warehouse Builder MOLAP dimension modeling Warehouse Builder MOLAP cube modeling Deploying MOLAP mappings

30 Copyright © 2009, Oracle. All rights reserved. 8 - 30 Tools to Build an Analytic Workspace Cube building Extract, transform, load (ETL) Oracle Warehouse Builder Analytic Workspace Manager (AWM) OWB: Advanced ETL and AW deployment AWM: Builds an analytic workspace from clean data Clean data Analytic workspace Source systems

31 Copyright © 2009, Oracle. All rights reserved. 8 - 31 Quiz An analytic workspace: Is a container that holds multidimensional data and objects Is designed for efficient processing of multidimensional calculations Supports advanced calculations and rapid query performance Is a special table (LOB) in a tablespace a.True b.False

32 Copyright © 2009, Oracle. All rights reserved. 8 - 32 Lesson Agenda OLAP concepts: Introduction Multidimensional data model –Measures –Dimensions –Hierarchies –Levels Analytic workspace Oracle Database 11g OLAP Warehouse Builder MOLAP dimension modeling Warehouse Builder MOLAP cube modeling Deploying MOLAP mappings

33 Copyright © 2009, Oracle. All rights reserved. 8 - 33 Dimensional Modeling Customers should need to think only about designing the dimension and cube, less about how the Oracle database stores data and performs extract, transform, load (ETL). Customers want to focus on product hierarchy; Oracle will figure out how and where to store data and perform ETL.

34 Copyright © 2009, Oracle. All rights reserved. 8 - 34 Enabling OLAP Solutions MOLAP? Schema Logical design Analytic Workspace ETL ROLAP? AW created using XML API to the OLAP option Warehouse Builder 11g is capable of directly loading any data into the analytic workspace, allowing, for the first time, the wealth of transformation power on OLAP data loads. Create a logical design describing your OLAP cubes in dimensions, hierarchies, measures, calculated measures, and other components. Warehouse Builder uses the XML API to the OLAP option to directly create the AW and its objects and the metadata required in the database catalogs. After you have created your cubes and dimensions, use the Warehouse Builder ETL modelers to create the load programs, independent of storage decisions.

35 Copyright © 2009, Oracle. All rights reserved. 8 - 35 Storage Management If you enter the name of an analytic workspace (AW) that does not exist, it will be created automatically when you deploy this object. If you do not specify an AW name, OWB will create an AW using the module name, as soon as you generate the dimensional object. If table space name is left blank, AW goes into the tablespace of the user. Two choices for keys

36 Copyright © 2009, Oracle. All rights reserved. 8 - 36 Dimensional Modeling Using OWB Advanced modeling features enables full spectrum of dimensional capabilities, including: Value-based hierarchies Skip-level hierarchies And more

37 Copyright © 2009, Oracle. All rights reserved. 8 - 37 Hierarchy Support: Value-Based Day Month Quarter Year Level-based hierarchy Value-based hierarchy Adam (VP) Smith (Admin) James (Admin) Bruce (Director) Jones (VP) KING (President) Lex (Director) Den (Director)

38 Copyright © 2009, Oracle. All rights reserved. 8 - 38 Create a Value-Based Hierarchy Value-based hierarchies are only for MOLAP dimensions.

39 Copyright © 2009, Oracle. All rights reserved. 8 - 39 Lesson Agenda OLAP concepts: Introduction Multidimensional data model –Measures –Dimensions –Hierarchies –Levels Analytic workspace Oracle Database 11g OLAP Warehouse Builder MOLAP dimension modeling Warehouse Builder MOLAP cube modeling Deploying MOLAP mappings

40 Copyright © 2009, Oracle. All rights reserved. 8 - 40 Calculated Measures CUSTOMER PRODUCTPRODUCT TIME Quantity Sold measure X= CUSTOMER PRODUCTPRODUCT TIME PRODUCTPRODUCT Unit Price measure Revenue calculated measure QuantityPriceRevenue X=

41 Copyright © 2009, Oracle. All rights reserved. 8 - 41 OWB Calculated Measures

42 Copyright © 2009, Oracle. All rights reserved. 8 - 42 Generating Calculated Measures Time Series Share/Index Rank

43 Copyright © 2009, Oracle. All rights reserved. 8 - 43 Sparsity If you mark a dimension as sparse, Warehouse Builder creates a composite dimension to manage sparse data.

44 Copyright © 2009, Oracle. All rights reserved. 8 - 44 Compress Cube

45 Copyright © 2009, Oracle. All rights reserved. 8 - 45 Partition Cube

46 Copyright © 2009, Oracle. All rights reserved. 8 - 46 Cost-Based Aggregation Cube wizard defaults to 20% of the lowest level of data to be precomputed. Pre-aggregation slows the build, but speeds up queries.

47 Copyright © 2009, Oracle. All rights reserved. 8 - 47 Level-Based Aggregation Level-based aggregation is available for cubes deploying to an Oracle release prior to 11g.

48 Copyright © 2009, Oracle. All rights reserved. 8 - 48 Lesson Agenda OLAP concepts: Introduction Multidimensional data model –Measures –Dimensions –Hierarchies –Levels Analytic workspace Oracle Database 11g OLAP Warehouse Builder MOLAP dimension modeling Warehouse Builder MOLAP cube modeling Deploying MOLAP mappings

49 Copyright © 2009, Oracle. All rights reserved. 8 - 49 Differences Between OLAP and Relational Loading Differences between OLAP and relational deployment and loading: Not much! (from the user perspective) 1.Deploy the data objects (dimensions and cubes). 2.Deploy the mappings. 3.Run the mappings to load data into an OLAP cube.

50 Copyright © 2009, Oracle. All rights reserved. 8 - 50 No Relational Tables to Bind Dimension Synchronize to repository object, data stored in relational table Implementing table Dimension Bind ROLAP MOLAP Deploy to DB, data stored in AW Cube-organized materialized view - Relational fact table - Summaries stored in AW Schema table AW

51 Copyright © 2009, Oracle. All rights reserved. 8 - 51 Partially Predefined OLAP Module Target module: SALES_AW Target user: SALES_AW All dimensions are predefined. All dimension-loading and cube-loading mappings are predefined. Create the SALES cube. Create the target user SALES_AW (test connecting with it in the SALES_AW_LOCATION ). Register SALES_AW_LOCATION with the DEFAULT_CONTROL_CENTER. Deploy dimensions, cube, and mappings. Execute mappings. Sales CustomersChannels Promotions Times Products DB source module: XSALES Channels, Promotions, Products, Addresses, Categories, Cities, Countries, Customers, Regions, Promo- subcategories, Promo- categories, Orders, Order_items Mappings Items in italic are predefined SALES_AW module (mostly predefined)

52 Copyright © 2009, Oracle. All rights reserved. 8 - 52 Examine the Predefined Dimensions and Mappings You define the SALES cube. Notice… no implementation tables!

53 Copyright © 2009, Oracle. All rights reserved. 8 - 53 Define the Sales Cube 1. Define quickly and easily using a wizard. 2. Make further specifications using an editor.

54 Copyright © 2009, Oracle. All rights reserved. 8 - 54 Create an OLAP Target User

55 Copyright © 2009, Oracle. All rights reserved. 8 - 55 Specify Whether to Create a Location

56 Copyright © 2009, Oracle. All rights reserved. 8 - 56 Location Created

57 Copyright © 2009, Oracle. All rights reserved. 8 - 57 Associate the Module with the Target Location Module configuration Control center Location User

58 Copyright © 2009, Oracle. All rights reserved. 8 - 58 Register the Target Location

59 Copyright © 2009, Oracle. All rights reserved. 8 - 59 Deploying OLAP Objects with Control Center Manager Deploying OLAP objects to AW is much like deploying relational objects.

60 Copyright © 2009, Oracle. All rights reserved. 8 - 60 Executing OLAP Mappings “Set based fail over to row based” is being chosen as the default operating mode.

61 Copyright © 2009, Oracle. All rights reserved. 8 - 61 View Cube Data in the Data Viewer CHANNELS dimension AMOUNT, COST, QUANTITY measures PRODUCTS dimension

62 Copyright © 2009, Oracle. All rights reserved. 8 - 62 Quiz In cubes, preaggregating slows the build, but speeds up the queries. a.True b.False

63 Copyright © 2009, Oracle. All rights reserved. 8 - 63 Summary In this lesson, you should have learned how to: Use Warehouse Builder MOLAP dimension modeling capabilities –Value-based and skip-level hierarchies –Default hierarchy for multidimensional query tools Use Warehouse Builder MOLAP cube modeling capabilities –Conformed dimensions –Defining multiple cubes using the same dimensions at different levels –Custom measures –Sparsity –Preaggregation

64 Copyright © 2009, Oracle. All rights reserved. 8 - 64 Practice 8-1: Overview In the hands-on practice, you will perform the following: Work on a partially defined MOLAP project, including creation of a MOLAP cube


Download ppt "8 Copyright © 2009, Oracle. All rights reserved. Modeling Multidimensional OLAP Dimensions and Cubes."

Similar presentations


Ads by Google