| Oracle9i OLAP Developer's Guide to the OLAP API Release 2 (9.2) Part Number A95297-01 |
|
Discovering the Available Metadata, 4 of 8
Getting the root MdmSchema is the first step in exploring the metadata in your data store.
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.

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".
The following code gets the root MdmSchema for an MdmMetadataProvider called mp.
MdmSchema root = mp.getRootSchema();
|
![]() Copyright © 2000, 2002 Oracle Corporation. All Rights Reserved. |
|