Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using Partitions and Fragments

Similar presentations


Presentation on theme: "Using Partitions and Fragments"— Presentation transcript:

1 Using Partitions and Fragments
Schedule: Timing Topic 20 minutes Lecture 40 minutes Practice 60 minutes Total

2 Oracle BI Suite EE 10g R3: Build Repositories 10 - 2
Objectives After completing this lesson, you should be able to: Identify reasons for segmenting data Describe techniques to model partitions Implement a value-based partition Implement a fact-based partition Oracle BI Suite EE 10g R3: Build Repositories

3 Oracle BI Suite EE 10g R3: Build Repositories 10 - 3
Business Challenge Data is often partitioned into multiple physical sources for a single logical table. Organizations need to seamlessly and efficiently access and process data from multiple sources to satisfy user requests. Business applications must “know” where to go for what type of data and under what conditions. Business Challenge Data is often partitioned into multiple physical sources for a single logical table in a business model. When a logical table source does not contain the entire set of data at a given level, you need to specify the portion or fragment of the set that it contains. For example, there are situations where data may be fragmented or partitioned. When individual sources at a given level contain information for a portion or fragment of the domain, an application needs to know the content of the sources to pick the appropriate source for the query. Seamless and efficient access from the users’ perspective is the goal. Oracle BI Suite EE 10g R3: Build Repositories

4 Business Solution: Oracle BI Server
Oracle BI repository can be configured so that Oracle BI Server handles the navigation to the appropriate source. Oracle BI Server seamlessly and efficiently accesses and processes data from multiple sources to satisfy user requests. Business Solution: Oracle BI Server When there are multiple sources, the metadata can be built so that Oracle BI Server handles the navigation to the appropriate source. Oracle BI Server can seamlessly access and process data from multiple sources efficiently to satisfy users’ requests. For example, as you saw in the previous lesson titled “Using Aggregates,” a database administrator may create an aggregate table to improve performance. The metadata must be configured correctly so that Oracle BI Server knows when it is appropriate to access the aggregate table instead of the detailed table when satisfying a user’s request. Oracle BI Suite EE 10g R3: Build Repositories

5 Oracle BI Suite EE 10g R3: Build Repositories 10 - 5
Partition Is a database element that contains part of the data for a fact or a dimension Combines with other data fragments as necessary May be: Fact-based Value-based Level-based Complex Partition A partition typically contains a subset of the data for a fact or dimension. A partition is the division of a database or its elements into distinct independent parts. Database partitioning is done for manageability, performance, or availability reasons. Partitioning can be done by building separate smaller databases or by splitting larger selected elements into smaller ones. For example, splitting one large table into many smaller tables. When a user requests data, it may be necessary to consolidate data from different partitions to complete the request. There are different partition types: fact-based, value-based, level-based, and complex. Each is discussed in detail in the slides that follow. Oracle BI Suite EE 10g R3: Build Repositories

6 Oracle BI Suite EE 10g R3: Build Repositories 10 - 6
Partitioning by Fact Data is partitioned by fact when different fact data is stored in different tables. Example: Actual sales versus quota targets Actual sales Quota targets Sales Rep Product Sale Sales Rep Product Quota 1100 1000 1100 2000 Partitioning by Fact Data may be stored in such a way that different facts are in different tables. For example, companies usually store sales quotas in tables separate from the actual sales history. Inventory data is also commonly found stored in a database separate from sales history. This is sometimes referred to as vertical partitioning because a theoretical all-encompassing fact table can be thought to be sliced “vertically,” with different columns going to different fact tables. Oracle BI Suite EE 10g R3: Build Repositories

7 Oracle BI Suite EE 10g R3: Build Repositories 10 - 7
Partitioning by Value Data is partitioned by value when the data is split into separate tables according to the values of the data. Example: Invoice data is stored separately for each region. Invoices for Central Region InvNbr Dollars Region 1000 Central Invoices for West Region InvNbr Dollars Region Partitioning by Value Data can also be partitioned into separate tables according to the values of the data. For example: East Region sales data may be in a different table from West Region sales data. Inventory data may be in separate tables segregated by warehouse. The data for the current year may not be in the same table as the data for prior years, or data could be separated by month, so that the last three years of data are in 36 separate tables. This type of partitioning creates complexity in the query environment. Not only is the table population increased, thereby creating another query navigation issue, but any user who seeks to answer a question such as “What is the total number of widgets in inventory?” has to query multiple tables and then consolidate the results. One of the important benefits of Oracle BI Server is that it can do this type of navigation and consolidation automatically, preserving a simple logical model of the data for the user to interact with. 114444 200 West Oracle BI Suite EE 10g R3: Build Repositories

8 Oracle BI Suite EE 10g R3: Build Repositories 10 - 8
Partitioning by Level Data is partitioned by level when the same facts are stored in separate tables at different levels of aggregation. Example: Detailed sales data is summarized and stored by year and region. Sales detailed data Sales by year and region Sales Rep Date Product Sale Year Total Dollars Region 1100 10000 1998 200000 Central 1100 25000 1999 300000 Central Partitioning by Level Data may also be partitioned by level. This occurs when the same facts are stored in separate tables at different levels of aggregation. You saw examples of this in the previous lesson. The use of aggregate tables is a common practice in data warehouse design because it is a very effective tool for improving query performance. Theoretically, however, the number of aggregate tables in a data warehouse can get very large. As such, data warehouse designers prefer to follow an incremental approach to creating aggregations. They look for the best performance, creating the aggregate tables that are going to be used most frequently and that offer the most data compression, that is, where the row counts decrease the most. Of course, aggregate fact tables invite aggregate dimension tables. The result is that while introducing aggregate tables goes a long way toward improving query performance, it also complicates the overall query environment. One of the important benefits of Oracle BI Server is that it is “aggregate aware.” It writes SQL to use an efficient aggregate table automatically, while preserving a simple logical model of the data for the user to interact with. The user, therefore, remains insulated from the actual aggregate navigation process and sees only the query results. 1100 10000 Oracle BI Suite EE 10g R3: Build Repositories

9 Oracle BI Suite EE 10g R3: Build Repositories 10 - 9
Complex Partitioning Data is partitioned using more than one technique. Example: Invoice sales data is partitioned by value and level. Invoices by month for Central Invoices by year for Central Month Total Dollars Region Year Total Dollars Region 199801 10000 Central 1998 200000 Central 199802 25000 Central Invoices by month for West Invoices by year for West Month Total Dollars Region Year Total Dollars Region Complex Partitioning Partitioning strategies can be mixed. For example, data may be partitioned by level and value so that at any given intersection of levels, multiple aggregate tables may exist. Moreover, at any given intersection of levels, not all values might be stored. For example, at a Brand, Month, and Market aggregate level, just the important brands might be stored. Certain queries at this level can use the aggregate tables; other queries, with different constraints, would have to use more detailed tables. Oracle BI Server also navigates complex partitions for the user. 199801 300000 West 1998 West 199802 350000 West Oracle BI Suite EE 10g R3: Build Repositories

10 ABC Example: Value-Based (Customer)
Replace the current, single source for customer data with two value-based partitions. Customers with names starting with letters A–M NewKey Name 1000 Clifton Lunch Customers with names starting with letters N–Z NewKey Name 1002 Tong’s Wok ABC Example: Value-Based (Customer) ABC wants to implement separate partitions for customer data. One partition will store data for A–M customers, the other stores data for N–Z customers. Oracle BI Suite EE 10g R3: Build Repositories

11 ABC Example: Fact-Based (Quota)
Allow users to query for actual sales data and quota data in a single query. Actual sales Quota targets Sales Rep Product Sale Sales Rep Product Quota 1100 1000 1100 2000 ABC Example: Fact-Based ABC sets sales quotas for its sales organization. These quotas are set at the region level by quarter. In addition, each of the region sales quotas is broken down by product type. Quota numbers are stored in an Excel workbook. You incorporate the quota numbers in the business model and create business measures to report variance from quota and percent of quota. Oracle BI Suite EE 10g R3: Build Repositories

12 ABC Example: Value-Based (Inventory)
Build a business model for inventory data that is fragmented into multiple tables. Eight quarters of inventory data stored in eight separate tables ABC Example: Value-Based (Inventory) ABC’s inventory data is fragmented; that is, it is split into multiple tables. Data values determine which table contains what data. In this example, eight quarters of inventory data are stored in eight separate tables. You need to create a business model for this fragmented inventory data. Oracle BI Suite EE 10g R3: Build Repositories

13 Oracle BI Suite EE 10g R3: Build Repositories 10 - 13
Implementation Steps Import physical sources. Create physical joins. Add sources to the Business Model and Mapping layer. Specify fragmentation content. Test the results. New step Implementation Steps Most of the steps listed here should be familiar by now. The only new step is specifying fragmentation content, which is discussed in detail in the next slide. Oracle BI Suite EE 10g R3: Build Repositories

14 Specify Fragmentation Content
Use the Expression Builder to define the type of content that the fragment contains. Set the flag to specify whether to combine this fragment with other data. Specifies that customer data from A–M is contained in this fragment Specify Fragmentation Content When a logical table source does not contain the entire set of data at a given level, you need to specify the portion, or fragment, of the set that it contains. Describe the content in terms of logical columns, using the “Fragmentation content” edit box on the Content tab of the Logical Table Source window. Click the ellipsis next to the “Fragmentation content” box to open the Expression Builder to build the expression. This is similar to the steps used to define aggregates. For aggregates, you specified the content using the level indicator. Here you use an expression to serve the same purpose—to identify what data the source contains. In this example, the D1_CustAtoM table contains the customer data for all customers whose names start with the letters A through M. In a request for customer data, this source may need to be combined with data from other sources at this level. In this example, that would be the D1_CustNtoZ table, which contains rest of the customer data. Specifies combining this fragment with the other Oracle BI Suite EE 10g R3: Build Repositories

15 Oracle BI Suite EE 10g R3: Build Repositories 10 - 15
Summary In this lesson, you should have learned how to: Identify reasons for segmenting data Describe techniques to model partitions Implement a value-based partition Implement a fact-based partition Instructor Note Review Questions Question: An aggregate table is a partition. True or false? Answer: True. Question: The end user needs to know what data is contained in which partition before submitting a query. True or false? Answer: False. The application handles the navigation to the partitions. The access for the user is seamless. Oracle BI Suite EE 10g R3: Build Repositories

16 Practice 10-1 Overview: Modeling a Value-Based Partition
This practice covers the following topics: Creating a partition Defining fragmentation content for a value-based partition Practice 10-1 Overview: Modeling a Value-Based Partition ABC wants to implement separate partitions for customer data. One partition stores data for customers A–M, the other stores data for customers N–Z. Oracle BI Suite EE 10g R3: Build Repositories

17 Practice 10-2 Overview: Modeling a Fact-Based Partition
This practice covers modeling a fact-based partition for quota data. Practice 10-2 Overview: Modeling a Fact-Based Partition ABC sets sales quotas for its sales organization. These quotas are set at the region level by quarter. In addition, each of the region sales quotas is broken down by product type. Quota numbers are stored in an Excel workbook. The quota.xls workbook is stored on your machine. You incorporate the quota numbers in the business model and create business measures to report variance from quota and percent of quota. Oracle BI Suite EE 10g R3: Build Repositories

18 Oracle BI Suite EE 10g R3: Build Repositories 10 - 18
Practice 10-3 Overview: Using the Calculation Wizard to Create Derived Measures This practice covers creating measures for the quota partition. Practice 10-3 Overview: Using the Calculation Wizard to Create Derived Measures Use the Calculation Wizard to create two derived measures: Variance from Quota and Percent of Quota. Oracle BI Suite EE 10g R3: Build Repositories

19 Practice 10-4 Overview: Modeling Fragmented Inventory Data
This practice covers defining fragmentation content for inventory data. Practice 10-4 Overview: Modeling Fragmented Inventory Data ABC’s inventory data is fragmented; that is, it is split into multiple tables. Data values determine which table contains what data. In this example, eight quarters of inventory data are stored in eight separate tables. You need to create a business model for this fragmented inventory data. Oracle BI Suite EE 10g R3: Build Repositories


Download ppt "Using Partitions and Fragments"

Similar presentations


Ads by Google