Oracle9i OLAP Developer's Guide to the OLAP DML Release 2 (9.2) Part Number A95298-01 |
|
Allocating Data, 2 of 5
The Oracle OLAP ALLOCATE
command distributes data from a source object to the cells of a target. The target is a variable that is dimensioned by one or more hierarchical dimensions. The source data is specified by dimension values at a higher level in a hierarchical dimension than the values that specify the target cells.
ALLOCATE
uses an aggregation map to specify the dimensions and the values of the hierarchies to use in the allocation, the method of operation to use for a dimension, and other aspects of the allocation.
Some of the allocation operations are based on existing data. The object containing that data is the basis object for the allocation. In those operations, ALLOCATE
distributes the data from the source based on the values of the basis object.
Forecasting and budgeting systems often use allocation in operations such as the automatic distribution of a bonus pool with the amounts based on the current salary and performance ratings of the employee.
An allocation is the opposite of an aggregation that you perform with the AGGREGATE
command. In an aggregation, the data at lower levels of a hierarchy is combined into data at higher levels. In an allocation, data at a higher level in the hierarchy is distributed to lower levels.
The ALLOCATE
command has operations that are the inverse of the operations of the AGGREGATE
command. Figure 9-1 shows an aggregation up a simple hierarchy. In a SUM
operation, the aggregation adds the detail level values 2, 3, and 4 to derive the value 9 at the aggregate level.
As an example of an allocation, you could take the aggregate value 9, double it to 18, and allocate the results to the detail level with the previous values of the detail level cells as the basis of the allocation. In Figure 9-2 the hierarchy on the left shows the result of an EVEN
allocation operation, in which the source value is distributed evenly. Each detail level cell receives a value of 6. The hierarchy on the right shows a PROPORTIONAL
allocation operation, in which the source value is distributed proportionately. The values allocated to the detail level are 4, 6 and 8.
The allocation operation methods range from simple allocations, such as copying the source data to the cells of the target variable, to very complex allocations, such as a proportional distribution of data from a source that is a formula, with the amount distributed being based on another formula, with multiple variables as targets, and with an aggregation map that specifies different methods of allocation for different dimensions.
The Oracle OLAP allocation system is very flexible and has many features, including the following:
ALLOCATE
commands to use the same set of dimension hierarchy values, operations, and arguments with different source, basis, or target objects.Along with the ALLOCATE
command, the OLAP DML contains other commands that support allocation. Table 9-1 lists those commands.
The remainder of this chapter describes the objects that you use to allocate data and the types of allocation operations, and provides examples of various allocations.
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|