Skip Headers

Oracle9i OLAP Developer's Guide to the OLAP API
Release 2 (9.2)

Part Number A95297-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Understanding OLAP API Metadata, 7 of 11


MdmHierarchy Class

MdmHierarchy is a subclass of MdmHierarchicalDimension, which is an abstract subclass of MdmDimension.

Description of an MdmHierarchy

An MdmHierarchy is an MdmHierarchicalDimension that includes all the elements of one or more hierarchical structures. That is, all the parents and children are within the MdmHierarchy.

Even though the parent-child relationships exist in the MdmHierarchy, its elements are represented as a simple list. The relationships among the elements are recorded in the parent and ancestors attributes, which you can obtain by calling the getParentRelation and getAncestorsRelation methods on the MdmHierarchy. You can obtain the region for each element by calling the getRegionAttribute method on the MdmDimensionDefinition of the MdmHierarchy. Sometimes the parent, ancestors, and region attributes are referred to as parent, ancestors, and region relations.

Typically, an MdmHierarchy is one of the following types:

When working with MdmHierarchy objects in the current release of the OLAP API, keep the following points in mind.

Elements of a Level MdmHierarchy

The elements of a level MdmHierarchy include all of the elements of all of its regions. The values of the elements in a particular level MdmHierarchy must be unique. The following examples present the elements of two level MdmHierarchy objects, one for calendar year and the other for fiscal year.

Level MdmHierarchy for Calendar Year

The following table lists the values of the elements for a level MdmHierarchy called mdmTimesDimCalHier, which includes the elements from four MdmLevel objects: mdmYear, mdmQuarter, mdmMonth, and mdmDay. The number of elements is 1529: 4 year elements, 16 quarter elements, 48 month elements, and 1461 day elements.

Elements of mdmTimesDimCalHier

1998

1998-Q1

1998-01

01-JAN-98

02-JAN-98

03-JAN-98

. . .

01-FEB-98

02-FEB-98

03-FEB-98

. . .

1998-Q2

1998-04

01-APR-98

02-APR-98

03-APR-98

. . .

1999

1999-Q1

1999-01

01-JAN-99

02-JAN-99

03-JAN-99

. . .



Level MdmHierarchy for Fiscal Year

The following table lists the values of the elements for a level MdmHierarchy called mdmTimesDimFisHier, which includes the elements from four MdmLevel objects: mdmFisYear, mdmFisQuarter, mdmFisMonth, and mdmFisDay. The number of elements is 1529: 4 fiscal year elements, 16 fiscal quarter elements, 48 fiscal month elements, and 1461 fiscal day elements.

In this example, the mdmFisDay MdmLevel is based on the same relational database column on which the mdmDay MdmLevel is based (see the earlier example for calendar year). Therefore, the values of the elements for these two MdmLevel objects are identical. However, this does not mean that the elements themselves are identical. The elements in mdmDay are distinct from the elements in mdmFisDay; only the values of the two sets of elements are the same.

Elements of timesDimFisHier

FIS-1998

FIS-1998-Q1

FIS-1998-01

01-JUL-98

02-JUL-98

03-JUL-98

. . .

01-AUG-98

02-AUG-98

03-AUG-98

. . .

FIS-1998-Q2

FIS-1998-04

01-OCT-98

02-OCT-98

03-OCT-98

. . .

FIS-1999

FIS-1999-Q1

FIS-1999-01

01-JUL-99

02-JUL-99

03-JUL-99

. . .



Terminology: Nodes and leaves

A level MdmHierarchy represents a tree structure with parent-child relationships. Elements in the lowest MdmLevel are referred to as leaves, and the elements in the MdmLevel objects above the lowest level are referred to as nodes. Nodes have children; leaves do not.

Elements of a union MdmHierarchy

The elements of a union MdmHierarchy include all of the elements of all of its regions. Another way to say this is that a union MdmHierarchy includes all of the elements of all of the MdmLevel objects in all of its subordinate MdmHierarchy objects. In hierarchical terms, the set of elements includes all of the leaves (the elements at the lowest level) and all of the nodes (the elements at the levels above the lowest one) for all the hierarchies.

Distinct elements in the regions of a union MdmHierarchy

The elements in the regions of a union MdmHierarchy are totally distinct. That is, a given element does not appear in more than one region of a union MdmHierarchy. This is the case even if the database administrator specified the same level in two different hierarchies of a dimension. When this happens, Oracle OLAP creates two different MdmLevel objects, one for each level MdmHierarchy.

Though the elements of a union MdmHierarchy are distinct, the values of the elements are not required to be unique. Therefore in the example below, the leaf elements of the two regions of the union MdmHierarchy have values that are identical.

Union MdmHierarchy for Time

Consider a union MdmHierarchy called mdmTimesDim, which has two regions. The first region is the MdmHierarchy called mdmTimesDimCalHier, which has 1529 elements. The second region is the MdmHierarchy called mdmTimesDimFisHier, which also has 1529 elements. The set of elements for mdmTimesDim is the union of the elements from its two MdmHierarchy objects. Because no element can appear in both MdmHierarchy objects, mdmTimesDim has 3058 elements. Note that a calendar year begins on January 1, while a fiscal year begins on July 1.

The following table lists the values of the elements of the union MdmHierarchy called mdmTimesDim. To distinguish the elements of mdmDay and mdmFisDay, whose values are identical, the word "(fiscal)" appears next to the values for mdmFisDay. The mdmDay and mdmFisDay objects were introduced earlier in the examples for the elements of a level MdmHierarchy.

Elements of mdmTimesDim

1998

1998-Q1

1998-01

01-JAN-98

. . .

1999

1999-Q1

1999-01

01-JAN-99

. . .

FIS-1998

FIS-1998-Q1

FIS-1998-01

01-JUL-98 (fiscal)

. . .

FIS-1999

FIS-1999-Q1

FIS-1999-01

01-JUL-99 (fiscal)

. . .




Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback