Conceptual Multidimensional Models Chapter in the Book : Multidimensional Databases

terms the content of a data warehousing application already in existence. Finally, a conceptual scheme provides a description of the contents of the data warehouse which, leaving aside the implementation aspects, is useful as a reference for devising complex analytical queries. 2.2 Modelling Multidimensional Applications Let us now investigate in more detail, but still informally, the fundamental ingredients of a conceptual data model for data warehousing. We start from the observation made above that the effectiveness of data warehousing modeling strictly depends on the ability to describe factual data according to appropriate dimensions, that is, “perspectives” under which data can be analyzed. For instance, in a data warehousing application for a retail company it is useful to organize data along dimensions such as products commercialized by the company, stores selling these products and days on which sales occur. To better support data analysis, it is useful to organize a dimension into a hierarchy of levels, obtained by grouping elements of the dimension according to the analysis needs. For instance, we might be interested in grouping products into brands and categories, and days into months and years. When the members of a level l can be grouped to members of another level l’ it is often said that l rolls up to l’. For instance, the level “product” rolls up to the level “brand”. A level usually has descriptive attributes (or simply descriptions) associated with it. For instance, descriptions of a store include its name, manager, and address. Let us consider a more concrete example, which will be used as a simple case study throughout this chapter. Example 2.1 The Toys4All company produces and sells a large number of products (mainly toys) in a chain of stores, over a wide territory. A main business goal for this company could be to understand the impact of promotions on sales, that is, how promotions influence product sales and to what extent promotions are profitable. Another important business goal could be the analysis of the warehouse process, where inventory levels should be measured monthly, for each product and warehouse controlled by the company. It follows that possible dimensions of the Toys4All data warehouse application are Product, Store, Warehouse, Time, and Promotion. The Product dimension may be organized into levels such as item (whose members are products such as Disney’s Dinosaur and Duplo Pooh), product-line (containing members like Mattel’s Disney and Lego Duplo), brand (Mattel and Lego), category (Popular Characters and Blocks), and department (Action Figures and Blocks). The elements of the Time dimension describe days over a period of time; this dimension may be organized into the levels day, month, quarter, year, and season. A member of the level day might be Feb 27, 2001. Members of the level day can be grouped to members of the level month, but also to members of the level season (e.g., Carnival). Descriptions of the item level might be its name and code. ■ Traditionally, the entities of an application subject to decision-oriented analysis are called facts and the specific and measurable aspects of a fact relevant for the analysis are known as measures. A collection of measures for the same fact can be nicely represented by means of a data cube (or hypercube) having a “physical” dimension for each “conceptual” dimension of measurement: a coordinate of the data cube specifies a combination of level members and the corresponding cell contains the measure associated with such a combination. Example 2.2 For the Toys4All company, a possible fact is the daily sale. This fact can be analyzed with respect to the day of the sale, the product sold, the store of the sale, and the promotion applied to the daily sale. The measurements made for each daily sale could include the number of units sold, the income and the cost. Thus, a data cube Sales can be used to describe daily information about the items sold by the stores of the chain. An instance of this data cube can state the fact that on Feb 27, 2001 the store Colosseum has sold 2 pieces of Duplo Pooh, applying a Carnival 2001 Promotion, for a corresponding gross income of 19.98 Euros against a cost of 14.98 Euros. In the warehouse process, measurable facts are the inventory levels, to be measured, for instance, monthly, for each product and warehouse. They can be modeled by means of a data cube Inventory. The measurements made for each monthly inventory could include the inventory level (the quantity in stock at the end of the month), the quantity shipped during the month, and the value at cost of the quantity in stock. ■ In the next section we will try to formalize the general notions discussed in this section. 3 A conceptual multidimensional model We now present a simple multidimensional data model “MD” that provides a number of constructs to describe, in an abstract but natural way, the basic notions involved in multidimensional analysis. As is customary in database models, we make a clear distinction between the scheme (which specifies the structure of a concept) and the instance (that is, the actual values associated with a concept). 3.1 Formal definition of MD We assume the existence of a finite set of base types such as text, integer, decimal, and date. Each base type t is associated with a domain of base values of that type. We also assume the existence of a countable set of names and a countable set of identifiers (ids). Such ids are values, distinct from base values, that are used to uniquely identify real life objects. A dimension has three main components: a set of levels, a set of level descriptions and a hierarchy over the levels. Definition 3.1 [Dimension scheme] An MD dimension scheme D consists of: a finite set L of names called levels; a finite set ∆ of names called level descriptions, for each level in L; each description is associated with a base type t; a partial order ≤ called roll up relation on the levels in L; if l1 ≤ l2 we say that l1 rolls up to l2. There is a natural graphical representation of an MD dimension. Some examples are reported in Figure 2. In this representation, levels are depicted by means of round-cornered boxes and there is a direct arc between the two levels l1 and l2 if l1 ≤ l2. Small diamonds depict the descriptions of a level. store store city store state Store address manager name city state warehouse warehouse city warehouse state Warehouse address manager name city state promotion price reduction promotion media