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

Discovering the Available Metadata, 4 of 8


Getting the Root MdmSchema

Getting the root MdmSchema is the first step in exploring the metadata in your data store.

Function of the Root MdmSchema

The metadata objects that are accessible through a given MdmMetadataProvider are organized in a tree-like structure, with the root MdmSchema at the top. Under the root MdmSchema are MdmDimension objects and one or more MdmSchema objects, which are referred to as subschemas. In addition, if there are any MdmMeasure objects that do not belong to a subschema, they are included under the root.

Subschemas have their own MdmMeasure and MdmDimension objects. Optionally, they can have their own subschemas as well.

The root MdmSchema contains all the MdmDimension objects that are in the subschemas. Therefore, a given MdmDimension typically appears twice in the tree. It appears once under the root MdmSchema and again under the subschema. If an MdmDimension does not belong to a subschema, it is listed only under the root.

The starting point for discovering the available metadata objects is the root MdmSchema, which is the top of the tree. The following diagram illustrates an MdmSchema that has two subschemas and four MdmDimension objects.

Figure 4-1 Root MdmSchema and Subschemas


Text description of mdschema.gif follows
Text description of the illustration mdschema.gif

Using the OLAP Metadata APIs, a database administrator arranges dimensions and measures under one or more top-level measure folders. When Oracle OLAP maps the measure folders to MdmSchema objects, it always creates the root MdmSchema above the MdmSchema objects for the top-level measure folders. Therefore, even if the database administrator creates only one measure folder, its corresponding MdmSchema will be a subschema under the root.

For more information about MDM metadata objects and how they map to OLAP metadata objects, see Chapter 2, "Understanding OLAP API Metadata".

Calling the getRootSchema Method

The following code gets the root MdmSchema for an MdmMetadataProvider called mp.

Example 4-2 Getting the Root MdmSchema

MdmSchema root = mp.getRootSchema();

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