Flylib.com

Books Software

 
 
 

AN ENLARGEMENT OF OPERATORS FOR HIERARCHIES

AN ENLARGEMENT OF OPERATORS FOR HIERARCHIES

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.

Insert level

The Insert level operator makes it possible to add a new level to a hierarchy (giving the variable name , the domain instances, and the relationships between this level and, respectively, the higher and lower adjacent levels in the hierarchy). The insertion of a new level, denoted by l i , between the above-mentioned levels, is represented through the symbol , where I i,1 , , I i,n represents the inserted level domain instances and

(where the instances of levels l 2 , l i , l 1 , are divided, respectively, into k , h , and n subsets and p j , q v ) also represents a generic set of l i , and l 1 level instances with j = 1,..., h and v = 1, , n .

Example 8: Let us consider the Location dimension shown in Figure 6. Let us suppose we insert the variable County between the variables City and State . We have to define its domain values, as well as the mapping relationship between City and County , and between County and State (see Figure 13). This is obtained by the following formula:

click to expand
Figure 13: Example of an Insert Level

Delete Level

The Delete 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 l i is denoted by , where l 1 and l 2 are, respectively, the relative lower and higher level in the given hierarchy. This is the converse operation of the insert level operation. Note that in this case the relationships between levels are defined automatically by the system.

Add Multiplicity

{% if main.adsdop %}{% include 'adsenceinline.tpl' %}{% endif %}

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)

Add Level

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).

CONCLUSIONS

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 verified . Then, we defined the concepts of multiplicity of a given hierarchy and of multiple hierarchies.

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 enlargement of the operator set, specifically for hierarchy manipulation, which are the Insert level, the Delete level, the Add multiplicity, and the Add level operators. For each situation discussed, clear examples are given.