Another example are
geographic hierarchies, that may be defined starting from any location attribute in
the fact schema. To avoid redundancy, the DFM provides a graphical shorthand for
denoting hierarchy sharing. Figure 4 shows two examples of shared hierarchies. Fact
INVOICE LINE has two date dimensions, with semantics invoice date and order date,
Figure 5. The fact schema for the SALES fact
4 Rizzi
Copyright ?© 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of
Idea Group Inc. is prohibited.
respectively. This is denoted by doubling the circle that represents attribute date
and specifying two roles invoice and order on the entering arcs. The second shared
hierarchy is the one on agent, that may have two roles: the ordering agent, that is a
dimension, and the agent who is responsible for a customer (optional).
Guideline.8: Explicitly representing shared hierarchies on the fact schema
is important since, during ROLAP logical design, it enables ad hoc solutions
aimed at avoiding replication of data in dimension tables.
Ragged.Hierarchies
Let a1,..., an be a sequence of dimension attributes that define a path within a hierarchy
(such as city, state, nat on). Up to now we assumed that, for each value of a1,
exactly one value for every other attribute on the path exists. In the previous case,
this is actually true for each city in the U.
Pages:
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67