Database Reference
In-Depth Information
3.1.1 Hierarchies
We have said that the granularity of a data cube is determined by the
combination of the levels corresponding to each axis of the cube. In Fig. 3.1 ,
the dimension levels are indicated between parentheses: Category for the
Product dimension, Quarter for the Time dimension, and City for the Customer
dimension.
In order to extract strategic knowledge from a cube, it is necessary to view
its data at several levels of detail. In our example, an analyst may want to
see the sales figures at a finer granularity, such as at the month level, or at
a coarser granularity, such as at the customer's country level. Hierarchies
allow this possibility by defining a sequence of mappings relating lower-level,
detailed concepts to higher-level, more general concepts. Given two related
levels in a hierarchy, the lower level is called the child and the higher level
is called the parent . The hierarchical structure of a dimension is called the
dimension schema , while a dimension instance comprises the members at
all levels in a dimension. Figure 3.2 shows the simplified hierarchies for our
cube example. In the next chapter, we give full details of how dimension
hierarchies are modeled. In the Product dimension, products are grouped
in categories. For the Time dimension, the lowest granularity is Day ,which
aggregates into Month , which in turn aggregates into Quarter , Semester ,
and Year . Similarly, for the Customer dimension, the lowest granularity is
Customer , which aggregates into City , State , Country ,and Continent .Itisusual
to represent the top of the hierarchy with a distinguished level called All .
Product
Time
Customer
All
All
All
Category
Year
Continent
Product
Semester
Country
Quarter
State
Month
City
Day
Customer
Fig. 3.2 Hierarchies of the Product , Time ,and Customer dimensions
At the instance level, Fig. 3.3 shows an example of the Product dimension. 1
Each product at the lowest level of the hierarchy can be mapped to a
1 Note that, as indicated by the ellipses, not all nodes of the hierarchy are shown.
 
Search WWH ::




Custom Search