Previous Table of Contents Next


11.3.3 Dimension and Hierarchy


    Figure 11-2 shows Dimension and Hierarchy, along with several other classes that model hierarchical structuring and deployment mappings.

   11.3.3.1 Dimension

   The OLAP metamodel defines two special types of Dimension: Time and Measure.

   A Time Dimension provides a means of representing time-series data within a multidimensional structure. The members of a Time Dimension usually define some

   Dimension


   Figure 11-2 OLAP Metamodel: Dimension and Hierarchy

   March 2003 OMG-CWM, v1.1: Organization of the OLAP Package

   base periodicity (for example, days of the week). The implementation of a Time Dimension might provide support for advanced “time-intelligent? functionality, such as the ability to automatically convert between different periodicities and calendars.

   The members of a Measure Dimension describe the meaning of the analytic values stored in each data cell of a multidimensional structure. For example, an OLAP application may define Sales, Quantity, and Weight as its measures. In this case, each data cell within the Cube stores three values, with each value corresponding to one of the three measures. A measure may have an associated data type. For example, Sales might be of a monetary type, Quantity an integer, and Weight a real number.

   11.3.3.2 Hierarchy

   The OLAP metamodel specifies two subclasses of Hierarchy: LevelBasedHierarchy and ValueBasedHierarchy.

   LevelBasedHierarchy

   LevelBasedHierarchy describes hierarchical relationships between specific levels of a Dimension. LevelBasedHierarchy is used to model both “pure level? hierarchies (for example, dimension-level tables) and “mixed? hierarchies; that is, levels plus linked nodes. Dimensional levels are modeled by the Level class, a subclass of MemberSelection that partitions a Dimension’s members into disjoint subsets, each representing a distinct level.

   For example, the Geography Dimension cited earlier contains members representing cities, states, and regions, such as “Stamford,? “Connecticut,? and “NorthEast.? It might also contain a single member called “USA? representing all regions of the United States. Therefore, the Geography Dimension could have four Levels named “City,? “State,? “Region,? and “ALL? respectively. Each Level specifies the subset of members belonging to it: All cities belong to the “City? Level, all states belong to the “State? Level, all regions belong to the “Region? Level, and the single “USA? member belongs to the “ALL? Level.

   When used in the definition of a consolidation path, the meaning of “level? is quite clear: Members occupying a given Level consolidate into the next higher Level (for example, City rolls up into State, State into Region, and Region into ALL).

   LevelBasedHierarchy contains an ordered collection of HierarchyLevelAssocations that defines the natural hierarchy of the Dimension. The ordering defines the hierarchical structure in top-down fashion; that is, the “first? HierarchyLevelAssociation in the ordered collection represents the upper-most level of the dimensional hierarchy. A HierarchyLevelAssociation may own any number of DimensionDeployments. DimensionDeployment is a metaclass that represents an implementation strategy for hierarchical Dimensions. The ordering of the DimensionDeployment classes may optionally be given an implementation-specific meaning (for example, desired order of selection of several possible deployment strategies, based on optimization considerations).

   ValueBasedHierarchy

   A ValueBasedHierarchy defines a hierarchical ordering of members in which the concept of level has little or no significance. Instead, the topological structure of the hierarchy conveys meaning. ValueBasedHierarchies are often used to model situations where members are classified or ranked according to their distance from a common root member (for example, an organizational chart of a corporation). In this case, each member of the hierarchy has some specific “metric? or “value? associated with it.

   ValueBasedHierarchy can be used to model pure “linked node? hierarchies (for example, asymmetric hierarchical graphs or parent-child tables).

   As with LevelBasedHierarchy, ValueBasedHierarchy also has an ordered collection of DimensionDeployments, where the ordering semantics are left to implementations to define.