|Oracle9i OLAP Developer's Guide to the OLAP API
Release 2 (9.2)
Part Number A95297-01
Introduction to the OLAP API, 5 of 6
As an application developer, you perform the following steps to create an OLAP API application:
Templateobjects that create end-user queries. This is an optional step.
The rest of this topic presents a general description of each step.
Consider broad questions such as the following:
Specify, in as much detail as possible, the nature of the queries that the end user will be able to make. Because the OLAP API makes it possible to define queries in a step-by-step process, it is also important to decide on the query modification capabilities that the application will offer the user. Consider questions such as the following:
Planning the end-user queries is a crucial step in the application design process, so you should complete it as thoroughly as possible. Ideally, you should create an end-user query model that identifies all the conceptual query objects with which the application user interface will deal. This strategy takes advantage of the strengths of object-oriented design, and it allows for a clear correspondence between user interface objects and OLAP API objects.
The following are examples of conceptual query objects for an application user interface:
Each of these conceptual query objects can be represented by an OLAP API
An optional step in implementing an OLAP API application is designing
Template objects. This step is recommended because, the use of
Template objects offers the following benefits:
Template, you can create a modifiable query. That is, when you have created one query and you want to execute another one that is similar but not identical, you do not have to create an entirely new query. You simply make a small change to the existing query. Thus, the query is dynamic, rather than static.
Template, you can capture a series of steps that a user has completed when specifying a query. Each step refines the query further and is recorded as a new query state. If the user decides to cancel one or more of the specification steps, you can rollback the query to an earlier state.
Template, you can make it correspond directly to the operations that a user performs. For example, if your application includes a balance sheet, you can create a balance sheet
Templatethat incorporates all the appropriate characteristics (such as a method of aggregation) and behaviors (such as automatic totalling).
For a more detailed example of how
Template objects mirror the query-building aspects of an application's user interface, imagine an application that allows the user to create a three-dimensioned cube of data through the following steps:
As the application developer for this interface, you would design a
Template subclass for each of the following objects: dimension, dimension selection, edge, and cube. As part of the design, you would specify methods on the
Template subclasses that allow you to combine objects as needed. For example, the edge
Template class might have an
addDimension method, and the cube
Template class might have an
addEdge method. Once you have implemented the dimension, dimension selection, edge, and cube
Template classes, you can use them again and again in your application. They are basic building blocks in your application's code for querying and manipulating data.
In this stage of the application design process, you should make detailed specifications for each
Template in the application. For information about designing
Template objects, see Chapter 10, "Creating Dynamic Queries".
Up to this step, you have not written any Java code. You have considered questions about the design of your application, and you have made detailed specifications for the
Template objects that your application will include. Now you must do the following to implement the application:
Templateclasses that you designed.
For information about coding an application that uses the OLAP API, see the subsequent chapters of this guide and the OLAP API Javadoc. See "Tasks That an OLAP API Application Performs" for a description of the tasks that an application typically performs.
Keep the following in mind when you deploy your application: