Presentation is loading. Please wait.

Presentation is loading. Please wait.

Oracle OLAP Creating Cubes Part 1: Concepts

Similar presentations


Presentation on theme: "Oracle OLAP Creating Cubes Part 1: Concepts"— Presentation transcript:

1 Oracle OLAP Creating Cubes Part 1: Concepts
Introduction Hello and welcome. My name is Marty Gubar – and I am part of the product management team for Oracle’s BI & Data Warehousing Platform. Oracle OLAP is a world class, multidimensional analytic engine embedded in the Oracle Database. This video is the first in a 2 part series that highlight creating Oracle OLAP cubes - introducing you to the concepts behind cube creation In part 2, you will see how these concepts are applied – using Analytic Workspace Manager to create OLAP cubes. Oracle OLAP Creating Cubes Part 1: Concepts Marty Gubar Oracle BI/DW Product Management

2 Creating Cubes Sources
REGION CUST SALES FACT INVENTORY ITEM Sources Creating cubes takes a few simple steps. You typically start with data sourced from flat files, views or tables. In this diagram, we have an example of several source tables. TIME

3 Creating Cubes Sources: Table Relationships
REGION CUST SALES FACT INVENTORY ITEM Sources: Table Relationships Upon closer inspection, you will notice that these tables are related to one another – for example the cust table connects to the region table. And the sales fact table connects – or has a foreign key – to the cust, item and time tables. The metadata describing these relationships is found in the Oracle Data Dictionary. TIME

4 Creating Cubes Sources: Column Relationships
REGION ITEM item_key type_key cat_key CUST SALES FACT INVENTORY ITEM Sources In addition to the relationships between tables, the columns within these tables may also be related. The product item table has columns like the item_key, subtype_key, category_key, etc. These relationships are not necessarily captured in the table’s metadata. TIME

5 Creating Cubes Dimensions Formalize Data Relationships
Geography REGION CUST SALES FACT Product INVENTORY ITEM Time Creating Cubes OLAP dimensions are database objects that formalize the relationships in the data. In this example, the source tables are inputs into 3 dimensions: Geography, Product and Time. TIME

6 Creating Cubes Dimensions Formalize Data Relationships
Geography Product Level-based Hierarchy Item Type Category REGION CUST SALES FACT Product INVENTORY Define the business relationships ITEM Time Creating Cubes In the case of the product item table, the 3 columns that we examined have a business relationships. These columns describe the levels of aggregation within a hierarchy: item rolls up into subtype, subtypes into types, and types into categories, etc. Of course, there may indeed be multiple hierarchies for each of these dimensions. TIME

7 Creating Cubes Dimensions Formalize Data Relationships
Geography Product Complex Hierarchy REGION CUST SALES FACT INVENTORY ITEM Time Creating Cubes There are also times when these hierarchies may be complex. For example, level-based dimensions may be ragged or skip level. Or, there may not be any levels at all – only a parent child relationship between the members of a dimension. OLAP dimensions naturally handle any type of hierarchy. Like tables, the metadata describing these hierarchies (as well as all metadata for cubes) is stored in the Oracle Data Dictionary). The metadata describing these dimensions and hierarchies (as well as all metadata for cubes and dimensions) is stored in the Oracle Data Dictionary. TIME Model complex hierarchical relationships

8 Creating Cubes Dimensions Formalize Data Relationships
Geography Product Hierarchical Relationships REGION CUST Parent SALES FACT Descendants Children INVENTORY ITEM Time Creating Cubes Because dimensions formalize hierarchical relationships – it is easy to identify members using family references. Keywords like children, descendants, parent and ancestor are used to select and reference members – greatly simplifying the definition of business models and calculations. TIME Use family references to simplify calculations

9 Creating Cubes Time Dimension Supports Any Calendar Type
Geography REGION MARCH Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Fiscal Year End CUST SALES FACT Product INVENTORY Time dimension simplifies time-series calculations ITEM Time Creating Cubes There are also special types of dimensions. For example, a time dimension may include different types of calendars: fiscal, manufacturing, retail, gregorian – or a calendar that is completely custom to an application. Introducing a time dimension facilitates the creation of time-based calculations into a cube - like YTD, Moving Average, lag and more. TIME

10 Creating Cubes Array-based Access of Summary Data
REGION Sales Cube CUST Product Geography SALES FACT Time INVENTORY Inventory Cube ITEM Product Creating Cubes Cubes are multidimensional objects stored in the Oracle database – and dimensions are indexes into the cubes. What’s nice is a dimension is defined once (and maintained once, and secured once, etc.) – and then used wherever it is required. In this diagram, you see two cubes: a sales cube and an inventory cube. The sales cube is 3 dimensional: by product, geography and time – while inventory is broken out by 2 of these dimensions: product and time. Typically, the leaf level of a cube is a summary over a detail fact table. TIME Time

11 Creating Cubes Aggregation Rules
REGION Sales Cube ∑ Aggregation Rules Product: Sum Geography: Sum Time: Sum CUST Product Geography SALES FACT Time INVENTORY Inventory Cube ITEM ∑ Aggregation Rules Product: Sum Time: Hierarchical Last Product Aggregation Rules After loading the leaf level of the cube, the data is aggregated over its dimensions using one or more aggregation methods. In this example, the sales data is aggregated using sum for each of the dimensions – whereas the measures in the inventory cube summarize data over product – but use a hierarchical last aggregation operator over time. You will find that many measures – including measures like bank balances, inventory balances, headcount – require different aggregation rules over time than they do over other dimensions. The TIME Time

12 Creating Cubes Rich, Embedded Analytic Calculations
REGION Sales Cube Calculations Sales YTD YTD Growth Market Share Product Alert Moving Average CUST Product Geography SALES FACT Time INVENTORY Inventory Cube ITEM Calculations Balance Inventory Cost Stock Out Product Creating Cubes A key benefit of cubes is the simple management and fast computation of analytic calculations. Calculations are easy to create because they are able to leverage the dimensional metadata. This makes the definition of time-series, shares, indexes, financial calculations, and more – a breeze. And, the OLAP DML is a procedural language that enables you to extend OLAP’s calculation capabilities to meet any business requirement. The computation of the calculations is extremely fast because it is performed simple array arithmetic – a method that is optimal for analytic measures. OLAP calculations are typically comparative in nature – whether you are comparing one product to another – this year to last year, etc. Because OLAP uses array arithmetic, potentially expensive joins and scans are not required to resolve these calculations TIME Time

13 Creating Cubes Tune Physical Properties
REGION Sales Cube Physical Properties: Cost Based Aggregation: 30 CUST Product Partition: Quarter Geography SALES FACT Time INVENTORY Inventory Cube ITEM Product Creating Cubes The Oracle Database and Oracle OLAP deliver many capabilities to help you manage large data sets. Three key OLAP features are partitioning, cost based aggregation and aggregate compression. Cost based aggregation is a new feature to Oracle Database 11g. The administrator specifies a threshold to precompute and store – say 30% - and the OLAP engine will pick the cells that are most costly to aggregate up to that threshold. The result is consistently fast query performance across the summary space. Cube partitioning is very similar to table partitioning. Cube partitioning seamlessly splits the cube into smaller, more manageable pieces. For example, you may partition your sales cube into quarters. One year of data will automatically define 4 partitions – one for each quarter. Each of these partitions may be loaded and aggregated independently – enabling parallel processing. In addition, partition pruning at query time access only the partitions that are required. So, if you are requesting Sales revenue for the latest week, month and quarter – a single quarterly partition will be accessed to retrieve the data. The result is improved query response time. TIME Time

14 Creating Cubes Tune Physical Properties
REGION Sales Cube Physical Properties: Cost Based Aggregation: 30 Product Time Geography Product Time Geography CUST Partition: Quarter Compress Aggregates: True SALES FACT INVENTORY Inventory Cube ITEM Product Creating Cubes Finally, aggregate compression is now the standard for OLAP cubes - greatly reducing their size using patented compression algorithms. Aggregate compression typically improves the time it takes to compute summaries by at least a factor of five – and oftentimes significantly more. The disk footprint is equally improved. TIME Time

15 Cube Views Automatically Synchronized with Cubes
Smart Search TIME Web Analysis SALES CUBE Smart Space Desktop Gadgets GEOGRAPHY SmartView INVENTORY CUBE Hyperion Visual Explorer Custom Application (SOAP, J2EE, .Net MDX, etc.) Cube Views OLAP Cubes are exposed using a traditional star design. Dimension views form a constellation around the cube views. These views are automatically created and maintained as you make updates to the structure of your dimensions and cubes. For example, if you add new measures – the cube view will be updated with columns for the new measures. The result is that the views are always in sync with the underlying dimensions and cubes. Note, a single cube view exposes all the aggregations and all the calculations for a cube. Each advanced analytic calculation is simply exposed as a column. The computation for the aggregations and calculations occurs in the OLAP engine. Because the business rules are embedded in the model, tools and applications then query the cube using very simple SQL. All users share a single version of the truth. PRODUCT

16 Cube-based Materialized Views Transparently Enhance Query Performance
Hyperion Financial Reporting Smart Search Automatic Query Rewrite Web Analysis Smart Space Desktop Gadgets SALES FACT SALES CUBE MV SmartView Custom Application (SOAP, J2EE, .Net MDX, etc.) Hyperion Visual Explorer Cube based MVs A cube may also be exposed as a materialized view. This allows summary queries against an underlying fact table to leverage the fast query response time of OLAP cubes. The beauty of this capability is that applications continue to query the fact table – they do not need to make any changes to leverage the cubes. If the cube can satisfy the query request, the Oracle optimizer will automatically rewrite the query to the cube – as it would with any materialized view. Applications transparently achieve improved query performance. Statistical Package (SPSS, etc.)

17 Creating Cubes with Analytic Workspace Manager
Analytic Workspace Manager – or AWM - ships with the database and is licensed with Oracle OLAP. It is a graphical tool used to create and maintain OLAP cubes. Let’s now take a look at how to create and manage cubes using AWM.

18 For More Information search.oracle.com Oracle OLAP
Oracle Technology Network For demonstrations, white papers, tutorials and more, visit: How do you learn more about Oracle OLAP? The best place to start is the Oracle Technology network. There, you will find videos, demonstrations, white papers, and tutorials. You can also download Oracle Database Enterprise Edition and take OLAP for a test drive – so you can see for yourself the value it can deliver to your organization.


Download ppt "Oracle OLAP Creating Cubes Part 1: Concepts"

Similar presentations


Ads by Google