Facts may be represented as tuples in fact tables. A multidimensional
database comprises a set of dimensions, along with a base fact table,
that is, a fact table whose attributes are the bottom categories of the dimensions. If
the dimension has many bottom categories, we may define a new unique category,
containing all the bottom elements, to address the base facts.
Cube Views, Data Cube
OLAP users need to analyze facts aggregated at multiple levels of abstraction. The
basic query that aggregates base facts at a granularity given by a list of categories,
one per dimension, is called a cube view. As an example, consider that the list of
dimensions has only the dimension of Figure 1. In this case, a granularity also can
be specified with a single category. The base fact table is the table SalesAtProduct
which has as attributes Product and Amount (this last attribute is the measure). A
cube view that sums the amounts sold at the category Department can be defined
by the following aggregate query:
SELECT Department, SUM(Amount)
FROM SalesAtProduct,?“[Product,Department]
WHERE SalesAtProduct.Product=?“[Product,Department].Product
GROUP BY Department.
A data cube is the set of all possible cube views defined over a list of dimensions,
a base table, and aggregated measures. In the context of a fixed data cube, we may
denote a cube view simply as CV[G] where G is a granularity (list of categories).
Pages:
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105