Database Reference
In-Depth Information
mappings of different constructs of the MultiDim
model to the relational and object-relational da-
tabases. In this chapter, we will summarize the
rules used for mapping to the relational model
since they are required to have an in-depth under-
standing of implementation details, as described
in the next sections.
The MultiDim model is based on the ER model,
thus its mapping to the relational model is based
on well-known rules, such as those described in
Elmasri and Navathe (2006):
(0,1) or (1,1), i.e., the parent-child
relationship is one-to-many, the table
corresponding to the child level is ex-
tended with the surrogate key of the
corresponding parent level, i.e., there
is a foreign key in the child relation
pointing to its parent relation.
If the cardinality of the child role is
(0,n) or (1,n), i.e., the parent-child re-
lationship is many-to-many, a new re-
lation is created that contains as attri-
butes the surrogate keys of the parent
and child levels. If the parent-child
relationship has a distributing factor,
an additional attribute is added to the
relation.
A fact relationship corresponds to an n-
A level corresponds to an entity type in the
ER model; it maps to a relation containing
all attributes of the level and includes an
additional attribute for a surrogate key.
A parent-child relationship corresponds to
a binary relationship type in the ER model.
Two different mappings exist, depending
on the cardinality of the child role given
that in order to have meaningful hierar-
chies we assume the maximum cardinality
of the parent role equal to n:
If the cardinality of the child role is
ary relationship type in the ER model; it
requires a new relation that includes as at-
tributes the surrogate keys of the partici-
pating levels. Furthermore, if a level plays
different roles, each role is represented by
an additional surrogate key. Since measures
are handled as attributes of the relationship
Figure 4. Hierarchy classification
Search WWH ::




Custom Search