Oracle9i OLAP Services Developer's Guide to the Oracle OLAP API
Release 1 (9.0.1)

Part Number A88756-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

Introduction to the OLAP API, 3 of 6


Access to Data and Metadata Through the OLAP API

Distinction between data and metadata

OLAP API metadata describes the data that is available to the OLAP API through a given connection. The metadata records three things:

In contrast, the fact that 3542 dollars worth of boys outerwear was sold in Atlanta during January 1999 is data, not metadata.

These examples distinguish between the metadata and the data for a measure called Sales. The OLAP API makes a similar distinction between the metadata and the data for dimensions. For example, the fact that a product dimension exists and that it has text values as elements is metadata. In contrast, the fact that one of its elements is "boys outerwear" is data.

MDM model in the OLAP API

The OLAP API's multidimensional metadata (MDM) model describes data in multidimensional terms, which are familiar to OLAP and data warehousing audiences. For example, it includes objects for measures, dimensions, hierarchies, and attributes.

The following are some of the Java classes that are supplied by the OLAP API in its implementation of the MDM model:

An MdmSchema is a container for MdmMeasure, MdmDimension, and other MdmSchema objects. An MdmSchema corresponds to a measure folder in the OLAP management feature of Oracle Enterprise Manager. Note that an MdmSchema does not necessarily correspond to a relational schema.

An MdmMetadataProvider gives an application access to metadata objects that were created by a database administrator using the OLAP management feature of Oracle Enterprise Manager. To obtain access to the metadata, an application uses the getRootSchema method in MdmMetadataProvider. This method returns the top-level MdmSchema, which contains all the MdmMeasure and MdmDimension objects that are accessible through this particular MdmMetadataProvider. The MdmDimension and MdmMeasure objects might be organized in a hierarchical tree, with subschemas nested under the top-level schema. Using the getMeasures, getDimensions, and getSubSchemas methods on all the nested MdmSchema objects, an application navigates through the metadata and discovers what data is available. In addition, the application can use methods to obtain the related MdmHierarchy, MdmLevel, and MdmAttribute objects.

Chapter 2 provides detailed information about the OLAP API metadata.

Access to data through the OLAP API

An MdmMeasure or MdmDimension represents data in the data store. For example, an MdmMeasure called salesAmount might represent a set of numeric elements whose values are dollar sales figures, and an MdmDimension called productDim might represent a set of text elements whose values are product names. However, an application cannot create a query on the data using an MdmMeasure or MdmDimension. As metadata, MdmMeasure and MdmDimension objects provide descriptive information about data, but they do not provide the ability to query on that data. And an application must create a query in order to select, calculate, and otherwise manipulate data for analysis.

In order to create a query on the data for an MdmMeasure or MdmDimension, an application calls the getSource method on the MdmMeasure or MdmDimension. This method creates a Source object that represents the data for the purpose of querying. A Source is a specification for a query that defines a result set, and in this case, the result set is the data for the MdmMeasure or MdmDimension.

In addition to representing the data for metadata objects, Source objects can represent the data for any query that an application creates. For example, a Source might specify a query for a selection of MdmDimension values (January, February, March) or a calculation of the values of one MdmMeasure minus those of another (salesAmount minus unitCost). An application can use the powerful methods on Source and its subclasses to combine data in any way that the user requires. And each new query is a new Source.

When an application prepares to display the data for a given Source, it creates a Cursor for the Source. The application then uses this Cursor to request and retrieve the data from the OLAP service. When an application makes a request for data, it can specify the typical amount of data that it requires at a given time (for example, enough to fill a 40-cell table on the screen). The OLAP service then handles the issues related to efficient retrieval. The application does not need to manage the timing, sizing, and caching of the data blocks that it retrieves through the OLAP API.

Because the primary focus of most OLAP applications is making queries against the data store, a significant proportion of their data manipulation code works with the following classes, each of which has methods for selecting, calculating, and otherwise manipulating data.

One of the useful characteristice of Source objects is that they make no distinction between dimensions and measures. All Source objects behave in the same way.

Access to data in a relational data store

To be accessed through the OLAP API, relational data must be stored in an instance of an Oracle database that has OLAP Services installed with it. The data must be in a data warehouse, and it must be organized according to a star or snowflake schema. For information about creating a data warehouse and about star and snowflake schemas, see the Oracle9i DataWarehousing Guide.

A database administrator uses the OLAP management feature in Oracle Enterprise Manager to add metadata to the data warehouse. The OLAP management feature makes it possible to organize data within one or more folders, which are containers for measures that are related by subject matter. Sometimes measure folders are referred to as business areas. The data store for an OLAP service includes all of the measure folders that are defined in the OLAP management feature of Oracle Enterprise Manager.

Access to data in an analytic workspace

The OLAP API also provides the ability to work with data and metadata that is managed by OLAP Services in an analytic workspace. The procedures for using the OLAP API are essentially the same in either case. However, the preparation of the data and metadata is different.

For more information about using an analytic workspace, see the Oracle9i OLAP Services Developer's Guide to the OLAP DML.

User connection requirements

In addition to ensuring that data and metadata have been prepared appropriately, an application developer must ensure that application users can make a connection to the data store through OLAP Services and that users have database privileges that give them access to the data. For information about setting up an OLAP service for such connections, see the Oracle9i OLAP Services Concepts and Administration Guide.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, 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