Вы находитесь на странице: 1из 19
Using Partitions and Fragments Copyright © 2008, Oracle. All rights reserved.
Using Partitions and Fragments Copyright © 2008, Oracle. All rights reserved.

Using Partitions and Fragments

Using Partitions and Fragments Copyright © 2008, Oracle. All rights reserved.

Copyright © 2008, Oracle. All rights reserved.

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

a value-based partition • Implement a fact-based partition 10 - 2 Copyright © 2008, Oracle. All

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.

where to go for what type of data and under what conditions. 10 - 3 Copyright

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.

processes data from multiple sources to satisfy user requests. 10 - 4 Copyright © 2008, Oracle.

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

– Fact-based – Value-based – Level-based – Complex 10 - 5 Copyright © 2008, Oracle. All

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 Product Sales Product Rep Sale Rep Quota 1100 1000 1100
Actual sales
Quota targets
Sales
Product
Sales
Product
Rep
Sale
Rep
Quota
1100
1000
1100
2000
Sales Product Rep Sale Rep Quota 1100 1000 1100 2000 10 - 6 Copyright © 2008,

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
Invoices for
Central
Region

InvNbr

Dollars

Region

1135293

1000

Central

InvNbr

Dollars

Region

114444

200

West

Invoices for West Region
Invoices for
West
Region
Region 114444 200 West Invoices for West Region 10 - 7 Copyright © 2008, Oracle. All

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 detailed data

Product

Sale

Sales Rep

Date

Product Sale Sales Rep Date

1100

19980105

10000

1100

19981001

25000

1100

19981010

10000

Sales by year and region
Sales by year and region

Region

Total

Dollars

Year

Region Total Dollars Year

1998

200000

Central

1999

300000

Central

Total Dollars Year 1998 200000 Central 1999 300000 Central 10 - 8 Copyright © 2008, Oracle.

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 month for Central

Region

Total

Dollars

Month

Region Total Dollars Month

199801

10000

Central

199802

25000

Central

Invoices by month for West
Invoices by month for West
 

Total

 

Month

Dollars

Region

199801

300000

West

199802

350000

West

Invoices by year for Central
Invoices by year for Central

Region

Total

Dollars

Year

Region Total Dollars Year

1998

200000

Central

Invoices by year for West Total Year Region Dollars 1998 3000000 West
Invoices by year for West
Total
Year
Region
Dollars
1998
3000000
West
year for West Total Year Region Dollars 1998 3000000 West 10 - 9 Copyright © 2008,

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
Customers
with names
starting with
letters A–M

NewKey

Name

1000

Clifton Lunch

Customers with names starting with letters N–Z
Customers
with names
starting with
letters N–Z

NewKey

Name

1002

Tong’s Wok

with letters N–Z NewKey Name 1002 Tong’s Wok 10 - 10 Copyright © 2008, Oracle. All

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 Product Sales Product Rep Sale Rep Quota 1100 1000 1100
Actual sales
Quota targets
Sales
Product
Sales
Product
Rep
Sale
Rep
Quota
1100
1000
1100
2000
Sales Product Rep Sale Rep Quota 1100 1000 1100 2000 10 - 11 Copyright © 2008,

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
Eight quarters of
inventory data
stored in eight
separate tables
quarters of inventory data stored in eight separate tables 10 - 12 Copyright © 2008, Oracle.

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
New step
Specify fragmentation content. • Test the results. New step 10 - 13 Copyright © 2008, Oracle.

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.

to specify whether to combine this fragment with other data. Specifies combining this fragment with the
to specify whether to combine this fragment with other data. Specifies combining this fragment with the
Specifies combining this fragment with the other
Specifies combining this
fragment with the other
Specifies that customer data from A–M is contained in this fragment
Specifies that customer
data from A–M is
contained in this fragment
that customer data from A–M is contained in this fragment 10 - 14 Copyright © 2008,

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

a value-based partition • Implement a fact-based partition 10 - 15 Copyright © 2008, Oracle. All

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

• Defining fragmentation content for a value-based partition 10 - 16 Copyright © 2008, Oracle. All

Practice 10-2 Overview:

Modeling a Fact-Based Partition

This practice covers modeling a fact-based partition for quota

data.

practice covers modeling a fact-based partition for quota data. 10 - 17 Copyright © 2008, Oracle.

Practice 10-3 Overview:

Using the Calculation Wizard to

Create Derived Measures

This practice covers creating measures for the quota partition.

This practice covers creating measures for the quota partition. 10 - 18 Copyright © 2008, Oracle.

Practice 10-4 Overview:

Modeling Fragmented Inventory Data

This practice covers defining fragmentation content for

inventory data.

covers defining fragmentation content for inventory data. 10 - 19 Copyright © 2008, Oracle. All rights