In this section we propose a set of operators which are able to change the primary configuration of a hierarchy by extending or reducing its number of levels, adding a new multiplicity, and creating a multiple hierarchy. To formalize them, let us consider that and are two adjacent levels of a given hierarchy defined as. Let us discuss them.
operator makes it possible to add a new level to a hierarchy (giving the variable
(where the instances of levels
, are divided, respectively, into
Let us consider the Location dimension shown in Figure 6. Let us suppose we insert the variable
Figure 13: Example of an Insert Level
operator redefines a hierarchy as a subset of the existing one by deleting a variable with its relative domain. This operation re-creates the mapping relationships between the two levels (higher and lower) adjacent to the deleted variable. The deletion of a level
is denoted by
are, respectively, the relative lower and higher level in the given hierarchy. This is the
The Add multiplicity operator duplicates a given hierarchy, by changing the name of the variables in order to specialize them, as already discussed in a previous section. Let H be a hierarchy. This operator is represented through AddmultiplicityH (additionalname) where additionalname is a string to be added to each variable name of the hierarchy in order to specialize the previous variable name.
Example 9: Let us consider Example 3. The hierarchy City of residence Province of residence Region of residence is obtained by Addmultiplicity Location (of residence)
The Add level operator creates a new hierarchy starting from a given hierarchy. It creates a new variable and its relative domain, and defines the mapping relationship between this and the variable of the starting hierarchy. These two hierarchies define, in this way, a multiple hierarchy. Let l n be a level to be added to a hierarchy defined as l 1 1 2 … n − 1 . The Add level operator is represented through:
and gives, as result, a hierarchy 1 1 1 2 … 1 n − 1 1 n
Example 10: An example of a multiple hierarchy has been already shown in Figure 9(d).
In this chapter, the issue of the characterization of a hierarchy is proposed. We distinguished between hierarchies in which the mapping between different levels is full and hierarchies in which this condition is not
Based on the definitions and concepts proposed in this paper, we discussed the characterization of the OLAP operators involved in the hierarchy manipulation. In particular, depending on the type of hierarchy, we studied the different behavior of the roll-up and the drill-down operators in order to keep consistent data that are the result of the queries. We also characterize the slice operator, defining the implicit dimension concept and specifying two different types of operator: P-slice and T-slice. Finally, we proposed an