Conceptual Multidimensional Data Model Based on ... - CiteSeerX

3 downloads 8109 Views 71KB Size Report
enable business decision makers to creatively approach, analyze and understand business ... [4] modeled a multidimensional database through the notations of ...
Conceptual Multidimensional Data Model Based on MetaCube Thanh Binh Nguyen, A. Min Tjoa, and Roland Wagner Institute of Software Technology, Vienna University of Technology Favoritenstrasse 9-11/188, A-1040 Vienna, Austria {binh,tjoa}@ifs.tuwien.ac.at Institute of Applied Knowledge Processing, University of Linz Altenberger Strasse 69, A-4040 Linz, Austria [email protected]

Abstract. In this paper, we propose a conceptual multidimensional data model that facilitates a precise rigorous conceptualization for OLAP. First, our approach has strong relation with mathematics by applying a new defined concept, i.e. H-set. Afterwards, the mathematic soundness provides a foundation to handle natural hierarchical relationships among data elements within dimensions with many levels of complexity in their structures. Hereafter, the multidimensional data model organizes data in the form of metacubes, the concept of which is a generalization of other cube models. In addition, a metacube is associated with a set of groups each of which contains a subset of the metacube domain, which is a H-set of data cells. Furthermore, metacube operators (e.g. jumping, rollingUp and drillingDown) are defined in a very elegant manner.

1 Introduction Data warehouses and OLAP are essential elements of decision support [5], they enable business decision makers to creatively approach, analyze and understand business problems [16]. While data warehouses are built to store very large amounts of integrated data used to assist the decision-making process [9], OLAP, which is first formulated in 1993 by [6], is a technology that processes data from a data warehouse into multidimensional structures to provide rapid response to complex analytical queries. Online Analytical Processing (OLAP) data is frequently organized in the form of multidimensional data cubes each of which is used to examine a set of data values, called measures, associated with multiple dimensions and their multiple levels. Moreover, dimensions always have structures and are linguistic categories that describe different ways of looking at the information [4]. These dimensions contain one or more natural hierarchies, together with other attributes that do not have a hierarchy’s relationship to any of the attributes in the dimensions [10]. Having and handling the predefined hierarchy or hierarchies within dimensions provide the foundation of two typical operations like rolling up and drilling down. Because unbalanced and multiple hierarchical structures (Fig. 1,2) are the common structures of dimensions, the two current OLAP technologies, namely ROLAP and MOLAP, have limitations in the handling of dimensions with these structures [15]. T. Yakhno (Ed.): ADVIS 2000, LNCS 1909, pp. 24-33, 2000. © Springer-Verlag Berlin Heidelberg 2000

Conceptual Multidimensional Data Model Based on MetaCube

25

all All

1999 Year

Q1.1999 Quater

Jan.1999

Feb.1999

Mar.1999 W1.1999

W5.1999

W9.1999

Month Week

1.Jan.1999

6.Jan.1999

1.Feb.1999

3.Feb.1999

3.Mar.1999

Fig. 1. An instance of the dimension Time with unbalanced and multiple hierarchical structure

Day

Fig. 2. A schema of the dimension Time with multihierarchical structure.

The goal of this paper is the introduction of a conceptual multidimensional data model that facilitates a precise rigorous conceptualization for OLAP. Our approach has strong relation with mathematics by applying a set of new defined mathematic concepts, i.e. H-relation, H-element, H-set, H-graph and H-partition. The mathematic soundness provides a foundation to handle natural hierarchical relationships among data elements within dimensions with many levels of complexity in their structures. Afterwards, the multidimensional data model organizes data in the form of metacubes. Instead of containing a set of data cells, each metacube is associated with a set of groups each of which contains a subset of the data cell set. Furthermore, metacube operators (e.g. jumping, rollingUp and drillingDown) are defined in a very elegant manner. The remainder of this paper is organized as follows. In section 2, we discuss about related works. Then in section 3, we introduce a conceptual data model that begins with the introduction of H-set concepts and ends with the definition of metacube concepts. The paper concludes with section 4, which presents our current and future works.

2 Related Works Since Codd’s [6] formulated the term Online Analytical Processing (OLAP) in 1993, many commercial products, like Arborsoft (now Hyperion) Essbase, Cognos Powerplay or MicroStrategy’s DSS Agent have been introduced on the market [2]. But unfortunately, sound concepts were not available at the time of the commercial products being developed. The scientific community struggles hard to deliver a common basis for multidimensional data models ([1], [4], [8], [11], [12], [13], [21]). The data models presented so far differ in expressive power, complexity and formalism. In the followings, some research works in the field of data warehousing systems and OLAP tools are summarized.

26

T.B. Nguyen, A.M. Tjoa, and R. Wagner

In [12] a multidimensional data model is introduced based on relational elements. Dimensions are modeled as “dimension relations”, practically annotating attributes with dimension names. The cubes are modeled as functions from the Cartesian product of the dimensions to the measure and are mapped to “grouping relations” through an applicability definition. In [8] n-dimensional tables are defined and a relational mapping is provided through the notation of completion. Multidimensional database are considered to be composed from set of tables forming denormalized star schemata. Attribute hierarchies are modeled through the introduction of functional dependencies in the attributes of dimension tables. [4] modeled a multidimensional database through the notations of dimensions and f-tables. Dimensions are constructed from hierarchies of dimension levels, whereas ftables are repositories for the factual data. Data are characterized from a set of roll-up functions, mapping the instance of a dimension level to instances of other dimension level. In statistical databases, [17] presented a comparison of work done in statistical and multidimensional databases. The comparison was made with respect to application areas, conceptual modeling, data structure representation, operations, physical organization aspects and privacy issues. In [3], a framework for Object-Oriented OLAP is introduced. Two major physical implementations exist today: ROLAP and MOLAP and their advantages and disadvantages due to physical implementation were introduced. The paper also presented another physical implementation called O3LAP model. [20] took the concepts and basic ideas of the classical multidimensional model based on the Object-Oriented paradigm. The basic elements of their Object Oriented Multidimensional Model are dimension classes and fact classes. [15] gives a first overview of our approach. In this paper, we address a suitable mutidimensional data model for OLAP. The main contributions are: (a) a new set of H-set concepts that provide a foundation to define multidimensional components, i.e. dimensions, measures and metacubes; (b) the introduction of a formal multidimensional data model, which is used for handling dimensions with any complexity in their structures; (c) the very elegant manners of definitions of three metacube operators, namely jumping, rollingUp and drillingDown.

3 Conceptual Data Model In our approach, a multidimensional data model is constructed based on a set of dimensions D = {D1 ,.., D x }, x ∈ 1 , a set of measures M = M1 ,.., M y , y ∈ 1 and a

{

}

set of metacubes C = {C1 ,.., C z }, z ∈ 1 , each of which is associated with a set of groups Groups (C i ) = G1 ,.., G p , p, i ∈ 1 ,1 ≤ i ≤ z . The following sections formally

{

}

introduce the descriptions of dimensions with their structures, measures, metacubes and their associated groups.

Conceptual Multidimensional Data Model Based on MetaCube

3.1

27

The Concepts of H-Set

Definition 3.1.1. [H-relation] A binary relation p∗ on a set S is called a H-relation if

p∗ is:

• irreflexive: if ( x, x) ∉ R, for all x ∈ S . • transitive: if ( x, z ) ∈ R and ( z , y ) ∈ R then ( x, y ) ∈ R , for all x, y, z ∈ S . Definition 3.1.2. [H-set and H-element] A H-set is a pair (S, p∗ ) and satisfies the following conditions: • Each element of S is called H-element, therefore the set S is now denoted by S= {hei ,.., he j } . • Having only one root element: ∃!root ∈ S : ( ¬∃he p ∈ S : he p p∗ root ), • Having leaf elements: { (het ∈ S ) | (¬∃heu ∈ S : het p∗ heu )} , • An H-graph GH = (VH , E H ) representing the H-set (S, p∗ ) is a directed graph that is defined as follows: − VH = S . A vertex represents each element of the set S. There exists only one root vertex, which is the vertex for the root element. − E H ⊆ S × S . If hei p∗ he j for distinct elements hei and he j , then the vertex for hei is positioned higher than the vertex for he j ; and if there is no hek different from both hei and he j such that hei p∗ hek and hek p∗ he j , then an edge is drawn from the vertex hei downward to the vertex he j . Definition 3.1.3. [H-path] Let G H be a H-graph representing a H-set (S, p∗ ). A Hpath hp in G H is a nonempty sequence hp = (he0 ,.., hel ) of vertexes such that

(hei , hei +1 ) ∈ E H for each i ∈ [0, l − 1] . The H-path hp is from he0 to hel and has length l. Definition 3.1.4. [H-partition] A collection of distinct non-empty subsets of a set S, denoted by {S1 ,.., Sl }, l ∈ 1 , is a H-partition of S if the three following conditions are satisfied: • Si ∩ S j = φ , ∀i, j ∈ 1,1 ≤ i < j ≤ l , l



US

i

=S,

i =1

• ∀Si ,1 ≤ i ≤ l : (¬∃het , heu ∈ Si ) | ((het p* heu ) or (heu p* het )) .

3.2

The Concepts of Dimensions

First, we introduce hierarchical relationships among dimension members by means of one hierarchical domain per dimension. A hierarchical domain is a H-set of dimension

28

T.B. Nguyen, A.M. Tjoa, and R. Wagner

elements, organized in hierarchy of levels, corresponding to different levels of granularity. It also allows us to consider a dimension schema as a H-set of levels. In this concept, a dimension hierarchy is a H-path along the dimension schema, beginning at the root level and ending at a leaf level. Moreover, the definitions of two

O

O

descendant ancestor and , provide abilities to dimension operators, namely E E navigate along a dimension structure. In a consequence, dimensions with any complexity in their structures can be captured with this data model. Definition 3.2.1. [Dimension Hierarchical Domain] A dimension hierarchical

domain, denoted by dom(D) =< DElements(D), p∗E > , is a H-set, where:

• DElements(D)= {all} ∪ {dm1 ,.., dmn } is a set of dimension elements of the dimension D, e.g. 1999, Q1.1999, Jan.1999, and 1.Jan.1999, etc are dimension members within the dimension Time (Fig. 1), • The all is the root, • The binary relation p∗E on the set DElements(D) is a H-relation. Definition 3.2.2. [Dimension Schema] A dimension schema is a H-set of levels, denoted by DSchema(D)= Levels(D) , p∗L , where: • Levels(D) = { All} ∪ {l1 ,.., lh }, h ∈ 1 is a finite set of levels of a dimension D, where: − ∀li ∈ Levels (D ), li =< Lnamei , dom(li )) : Œ Œ Œ

Lnamei is the name of a level, e.g. Year, Month, Week, and Day are level names of the dimension Time, dom(li ) is one of {dom( All ), dom(l1 ),.., dom(lh )}, h ∈ 1 , the collection of which is a H-partition of DElements(D), The All is the root level, where: dom( All ) = {all} ,

− Leaf levels: { ∀li ∈ Levels(D) (∀dm j ∈ dom(li ) is a leaf element )} . • The binary relation p ∗L on the set Levels(D) is a H-relation and satisfies the following condition:

∀li , l j ∈ Levels(D) , li p∗L l j is given if there exits a map f ances : dom(l j ) → dom(li ) : (∀dm p ∈ dom(l j )), (∃!dmq ∈ dom(li ) | dmq = f ances (dm p )) , such: dm p p∗E dmq . Definition 3.2.3. [Dimension Hierarchy] Let GHL be a H-graph representing the Hset DSchema(D)= Levels(D) , p∗L , which is the schema of a dimension D. A hierarchy is a H-path hp = ( All ,.., lleaf ) that begins at the All (root) level and ends at a leaf level. Let H (D) = {h1,.., hm }, m ∈ 1 be a set of hierarchies of a dimension D. If m=1 then the dimension has single hierarchical structure, else the dimension has multihierarchical structure.

Conceptual Multidimensional Data Model Based on MetaCube

29

Definition 3.2.4. [Dimension Operators] Two dimension operators (DO), namely

O Eancestor

and

O Edescendant , are defined as follows:

∀lc , la , ld ∈ Levels(D) , ∀dmi ∈ dom(lc ) :

O O 3.3

ancestor (dmi , la ) D

dm j ∈ dom(la ) : dm j p*E dmi  = undefined

If (l a p*L lc )

{dmt ∈ dom(ld ) | dmi p*E 

If (lc p*L ld )

descendant (dmi , ld ) D

= undefined

dmt }

Else

Else

The Concepts of Measures

In this section we introduce measures, which are the objects of analysis in the context of multidimensional data model. First, we introduce the notion of measure schema, which is a tuple MSchema(M ) = Fname, O . In case a measure that O is ”NONE”, then the measure stands for a fact, otherwise it stands for an aggregation. Definition 3.3.1. [Measure Schema] A schema of a measure M is a tuple MSchema(M ) = Fname, O , where: • Fname is a name of a corresponding fact, • O ∈ Ω ∪ {NONE, COMPOSITE} is an operation type applied to a specific fact [2]. Furthermore: − Ω={SUM, COUNT, MAX, MIN} is a set of aggregation functions. − COMPOSITE is an operation (e.g. average), where measures cannot be utilized in order to automatically derive higher aggregations. − NONE measures are not aggregated. In this case, the measure is the fact.

N

be a numerical domain where a measure Definition 3.3.2. [Measure Domain] Let value is defined (e.g. 1, =, 5or a union of these domains). The domain of a measure is a subset of

3.4

N. We denote by dom(M) ⊂ N

.

The Concepts of MetaCubes

First, a metacube schema is defined by a triple of a metacube name, an x tuple of dimension schemas, and a y tuple of measure schemas. Afterwards, each data cell is an intersection among a set of dimension members and measure data values, each of which belongs to one dimension or one measure. Furthermore, data cells of within a metacube domain are grouped into a set of associated granular groups, each of which expresses a mapping from the domains of x-tuple of dimension levels (independent variables) to y-numerical domains of y-tuple of numeric measures (dependent variables). Hereafter, a metacube is constructed based on a set of dimensions, and consists a metacube schema, and is associated with a set of groups.

T.B. Nguyen, A.M. Tjoa, and R. Wagner

Product

St or e

30

Mexico USA

Alcoholic

10

Dairy

50

Beverage

20

Baked Food

12

Meat

15

Seafood

10

1 2 3 4 5 6 Time

Fig. 3. Sales metacube is constructed from three dimensions: Store, Product and Time and one fact: TotalSale.

Let a metacube C be constituted from x dimensions D1 ,.., D x , x ∈ 1 , and y measures M1 ,.., M y , y ∈ 1 . Definition 3.4.1. [MetaCube Schema] A CSchema(C)= Cname, DSchemas, MSchemas :

metacube

schema

is

tuple

• Cname is the name of a metacube, • DSchemas =< DSchema(D1 ),.., DSchema(D x ) > is a x-tuple of schemas of x dimensions D1 ,.., D x , x ∈ 1 with DSchemas(i ) = DSchema(Di ),1 ≤ i ≤ x , • MSchemas =< MSchema(M1 ),.., MSchema(M y ) > is a y-tuple of schemas of y measures M1 ,.., M y , y ∈ 1 with MSchemas( j ) = MSchema(M j ),1 ≤ j ≤ y . Definition 3.4.2. [MetaCube Hierarchy Domain] A metacube hierarchy domain, denoted by dom(C) = Cells(C) , p∗C is a H-set, where: • Given a function

× dom(D ) × × dom(M ) → {true, false} , y

x

f:

i

i =1

determined as: Cells (C) = {c ∈

j

j =1

× dom(D ) × × dom(M y

x

i =1

Cells (C) is

i

j =1

j)

f (c) = true}

• The binary relation p ∗C on the set Cells(C) is a H-relation. Definition 3.4.3. [Group] A group is triple G= Gname, GSchema(G ), dom(G ) where: • Gname is the name of the group, • GSchema(G)= GLevels(G ), GMSchemas(G ) : − GLevels(G ) =< lD1 ,.., l D x >∈

× Levels(D ) x

i =1

i

is a x-tuple of levels of the x

dimensions D1 ,.., D x , x ∈ 1 . − GMSchemas(G ) =< MSchema(M1 ),.., MSchema(M y ) > is a y-tuple of measure schemas of the y measures M1 ,.., M y , y ∈ 1 .

Conceptual Multidimensional Data Model Based on MetaCube

• dom(G ) = {c ∈

× dom(l

× dom(M ) ∈ Cells(C)} y

x

i =1

31

Di



j =1

j

Let hi be a number of levels of each dimension Di (1≤i≤x). The total set of groups over x

a metacube C is defined as Groups(C) = {G1 ,.., G p }, p =

∏ h [18]. i

i =1

Definition 3.4.4. [MetaCube Operators] Three basic navigational metacube operators (CO), namely jumping, rollingUp and drillingDown, which are applied to navigate along a metacube C, corresponding to a dimension Di, are defined as follows: ∀G c ∈ Groups(C) , lc ∈ Levels(Di ) and lc ∈ GLevels(G c ) , ∀l j , lr , ld ∈ Levels(Di ) . jumping: jumping (G c , l j , D i ) = G j =< GLevels(G j ), GMSchemas(G j ) >

Where: GMSchemas(G j ) = GMSchemas(G c ),

GLevels(G j )(i ) = l j , GLevels(G j )(k ) = GLevels(G c )(k ), ∀k ≠ i. rollingUp: ∀dm ∈ dom(lc ) , G r = jumping (G c , lr , Di ) . rollingUp (G c , dm, lr , D i ) = G rsub =< GSchema (G rsub ), dom(G rsub ) >

Where:

GSchema(G rsub ) = GSchema(G r ) , dom(G rsub ) = {cr ∈ dom(G r ) | ∃c ∈ dom(G c ) : c.dms (i ) = dm, cr .dms (i ) = O dancestor ( dm, lr , D i ) , cr .dms ( j ) = c.dms ( j ), ∀j ≠ i}

drillingDown: ∀dm ∈ dom(lc ) , G d = jumping (G c , ld , Di ) . drillingDo wn (G c , dm, ld , Di ) = G dsub =< GSchema (G dsub ), dom(G dsub ) >

Where:

GSchema(G dsub ) = GSchema(G d ) , dom(G dsub ) = {cd ∈ dom(G d ) | ∃c ∈ dom(G c ) : c.dms (i ) = dm, cd .dms (i) ∈O ddescendant ( dm, ld , D i ) , cd .dms ( j ) = c.dms ( j ), ∀j ≠ i}

Definition 3.4.5. [Metacube] A metacube is a tuple C= < CSchema,D , Groups, CO > , where: • CSchema is a metacube schema, • D = D1 ,.., D x , x ∈ 1 is the set of dimensions, • Groups is a total set of groups of the metacube. • CO is a set of metacube operators.

32

T.B. Nguyen, A.M. Tjoa, and R. Wagner

4 Conclusion and Future Works In this paper, we have introduced the conceptual multidimensional data model, which facilitates even sophisticated constructs based on multidimensional data elements such as dimension elements, measure data values and then cells. The data model has strong relationship with mathematics by using a set of new mathematic concepts, namely H-set to define its multidimensional components, i.e. dimensions, measures, and metacubes. Based on these concepts, the data model is able to represent and capture natural hierarchical relationships among dimension members. Therefore, dimensions with complexity of their structures, such as: unbalanced and multihierarchical structures [15], can be modeled in an elegant and consistent way. Moreover, the data model represents the relationships between dimension elements and measure data values by mean of data cells. In consequence, the metacubes, which are basic components in multidimensional data analysis, and their operators are formally introduced. In context of future works, we are investigating two approaches for implementation: pure object-oriented orientation and object-relational approach. With the first model, dimensions and metacube are mapped into an object-oriented database in term of classes. In the other alternative, dimensions, measure schema, and metacube schema are grouped into a term of metadata, which will be mapped into object-oriented database in term of classes. Some useful methods built in those classes are used to give the required Ids within those dimensions. The given Ids will be joined to the fact table, which is implemented in relational database.

Acknowledgment th

This work is partly supported by the EU-4 Framework Project GOAL (Geographic Information Online Analysis)-EU Project #977071 and by the ASEAN European Union Academic Network (ASEA-Uninet), Project EZA 894/98.

References 1. Agrawal, R., Gupta, A., Sarawagi, A.: Modeling Multidimensional Databases. IBM Research Report, IBM Almaden Research Center, September 1995. 2. Albrecht, J., Guenzel, H., Lehner, W.: Set-Derivability of Multidimensiona Aggregates. First International Conference on Data Warehousing and Knowledge Discovery. DaWaK’99, Florence, Italy, August 30 - September 1. 3. Buzydlowski, J. W., Song, II-Y., Hassell, L.: A Framework for Object-Oriented On-Line Analytic Processing. DOLAP 1998 4. Cabibbo, L., Torlone, R.: A Logical Approach to Multidimensional Databases. EDBT 1998 5. Chaudhuri, S., Dayal, U.: An Overview of Data Warehousing and OLAP Technology. SIGMOD Record Volume 26, Number 1, September 1997. 6. Codd, E. F., Codd, S.B., Salley, C. T.: Providing OLAP (On-Line Analytical Processing) to user-analysts: An IT mandate. Technical report, 1993. 7. Connolly, T., Begg, C.: Database system: a practical approach to design, implementation, and management. Addison-Wesley Longman, Inc., 1999.

Conceptual Multidimensional Data Model Based on MetaCube

33

8. Gyssens, M., Lakshmanan, L.V.S.: A foundation for multi-dimensional databases, Proc. VLDB’97. 9. Hurtado, C., Mendelzon, A., Vaisman, A.: Maintaining Data Cubes under Dimension Updates. Proc IEEE/ICDE ’99. 10.Kimball, R.: The Data Warehouse Lifecycle Toolkit. John Wiley & Sons, Inc., 1998. 11.Lehner, W.: Modeling Large Scale OLAP Scenarios. 6th International Conference on Extending Database Technology (EDBT’98), Valencia, Spain, 23-27, March 1998. 12.Li, C., Wang, X.S.: A Data Model for Supporting On-Line Analytical Processing. CIKM 1996. 13.Mangisengi, O., Tjoa, A M., Wagner, R.R.: Multidimensional Modelling Approaches for OLAP. Proceedings of the Ninth International Database Conference “Heterogeneous and Internet Databases” 1999, ISBN 962-937-046-8. Ed. J. Fong, Hong Kong, 1999 14.McGuff, F., Kador, J.: Developing Analytical Database Applications. Prentice Hall PTR, 1999. 15.Nguyen, T.B., Tjoa, A M., Wagner, R.R.: Conceptual Object Oriented Multidimensional Data Model for OLAP. Technical Report, IFS, Vienna 1999. 16.Samtani, S., Mohania, M.K., Kumar, V., Kambayashi, Y.: Recent Advances and Research Problems in Data Warehousing. ER Workshops 1998. 17.Shoshani, A.: OLAP and Statistical Databases: Similarities and Differences. Tutorials of PODS 1997. 18.Shukla A., Deshpande, P., Naughton, J. F., Ramasamy, K.: Storage Estimation for Multidimensional Aggregates in the Presence of Hierarchies. VLDB 1996: 522-531 19.Thomsen, E.: OLAP solutions: Building Multidimensional Information Systems. John Wiley& Sons, Inc., 1997. 20.Trujillo, J., Palomar, M.: An Object Oriented Approach to Multidimensional Database. Conceptual Modeling (OOMD), DOLAP 1998. 21.Vassiliadis, P.: Modeling Multidimensional Databases, Cubes and Cube operations. In Proc. 10th Scientific and Statistical Database Management Conference (SSDBM '98), Capri, Italy, June 1998. 22.Wang, M., Iyer, B.: Efficient roll-up and drill-down analysis in relational database. In 1997 SIGMOD Workshop on Research Issues on Data Mining and Knowledge Discovery, 1997.