Database Reference
In-Depth Information
categories. If this were the case, each product sales would be counted twice,
one for each category.
￿ Completeness: All instances must be included in the hierarchy and each
instance must be related to one parent in the next level. For example,
the instances of the Time hierarchy in Fig. 3.2 must contain all days in
the period of interest, and each day must be assigned to a month. If
this condition were not satisfied, the aggregation of the results would be
incorrect, since there would be dates for which sales will not be counted.
￿ Correctness: It refers to the correct use of the aggregation functions. As
explained next, measures can be of various types, and this determines the
kind of aggregation function that can be applied to them.
According to the way in which they can be aggregated, measures can be
classified as follows:
￿ Additive measures can be meaningfully summarized along all the
dimensions, using addition. These are the most common type of measures.
For example, the measure Quantity in the cube of Fig. 3.1 is additive: it can
be summarized when the hierarchies in the Product , Time ,and Customer
dimensions are traversed.
￿ Semiadditive measures can be meaningfully summarized using addition
along some , but not all, dimensions. A typical example is that of
inventory quantities, which cannot be meaningfully aggregated in the Time
dimension, for instance, by adding the inventory quantities for two different
quarters.
￿ Nonadditive measures cannot be meaningfully summarized using addi-
tion across any dimension. Typical examples are item price, cost per unit,
and exchange rate.
Thus, in order to define a measure, it is necessary to determine the
aggregation functions that will be used in the various dimensions. This is
particularly important in the case of semiadditive and nonadditive measures.
For example, a semiadditive measure representing inventory quantities
can be aggregated computing the average along the Time dimension and
computing the sum along other dimensions. Averaging can also be used
for aggregating nonadditive measures such as item price or exchange rate.
However, depending on the semantics of the application, other functions such
as the minimum, maximum, or count could be used instead.
In order to allow users to interactively explore the cube data at different
granularities, optimization techniques based on aggregate precomputation are
used. To avoid computing the whole aggregation from scratch each time the
data warehouse is queried, OLAP tools implement incremental aggregation
mechanisms. However, incremental aggregation computation is not always
possible, since this depends on the kind of aggregation function used. This
leads to another classification of measures, which we explain next.
Search WWH ::




Custom Search