Database Reference
In-Depth Information
Figure 7. An unbalanced hierarchy in SSAS: a) schema and b), c) instances
Unbalanced Hierarchies
DimSalesTerritory table in Figure 2 for the Sales
territory hierarchy from Figure 3.
SSAS represents an unbalanced hierarchy as
shown in Figure 7a. For displaying instances,
the designers can choose between two options:
to display the repeated member (Figure 7b) (the
default option) or to exclude (i.e., hide) this
member completely (Figure 7c). To hide a level
member, designers should modify the HideMem-
berIf property by selecting one of the following
alternatives: (1) OnlyChildWithParentName:
when a parent member has one child member with
a parent member name, (2) OnlyChildWithNoN-
ame: when a parent member has only one child
with a null or an empty string, (3) ParentName:
when a parent member have one or more child
members with the same name as parent, or (4)
NoName: when a parent member have one or
more child members with null value. Note that
this is an incorrect assignment, because in the
case of unbalanced hierarchies only the first and
second options should be applied, i.e., the parent
member will have at most one child member with
the same name, e.g., the name Canada in Figure
7b will be repeated in the missing levels until the
tree representing the instances is balanced.
As can be seen, unbalanced hierarchies cannot
be differentiated from other kinds of hierarchies
using the logical or implementation model since
these models only consider schema representa-
tions. In contrast, the MultiDim model classifies
An unbalanced hierarchy 3 is a simple hierar-
chy that has only one path at the schema level.
At the instance level some parent members may
not have an associated child. This is implied by
the cardinalities as shown in Figure 6a for the
Sales territory hierarchy composed of Region ,
Country , and Group levels. Since the division in
some countries (e.g., Canada) does not include
regions (Figure 6b), the minimum cardinality of
the parent role is 0.
Given that in the multidimensional model
measures are included in the fact relationship
that represents the relationships between leaf
members, the unbalanced hierarchies may lead
to the problem of excluding from the analysis
the members of higher levels that do not have
leaf members. For example, since in Figure 3 all
measures are associated with the leaf level, i.e., the
Region level, these measures will be aggregated
into the higher levels, i.e., the Country level, only
for those countries that have regions, excluding
Canada from aggregation as can be seen in Figure
6b. To avoid this problem, a usual practice is to
transform an unbalanced hierarchy into a balanced
one by introducing null values or placeholders
in missing levels, e.g., repeating the name of
Canada for the Region member. Afterwards, the
mapping for balanced hierarchies can be applied
leading to the star or snowflake schema, e.g., the
Search WWH ::




Custom Search