Skip Headers

Oracle9i OLAP User's Guide
Release 2 (9.2)

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

OLAP_TABLE Function, 4 of 6


Creating Object Type Definitions Used by OLAP_TABLE

Creating type definitions that are used by the OLAP_TABLE function involves:

  1. Designing the objects that will represent the analytic workspace structures.
  2. Writing the object type definitions and the table definitions to define the analytic workspace data as a table of objects.

Designing the Objects

Each object type represents a row in a table. When mapping analytic workspace structures to object types, typically, you do not define one object type for each analytic workspace structure. Instead, you map many analytic workspace structures to just a few objects:

For a more complete discussion of the data warehouse designs that you can mimic in your design, see "Data Structures in Relational and Multidimensional Data Stores".

For each object, you need to identify the attributes that correspond to the columns of the table. To do this, you first need to determine if you want to support the use of WHERE clauses when selecting the data. Only those attributes (table columns) that appear in the limit-map parameter of the OLAP_TABLE function can be referenced in a WHERE clause.

Typically, you will want to support the use of WHERE clauses. In this case, you need to determine the format of the limit-map parameter in order to determine the columns of each table. The columns of each table must correspond exactly to the columns specified in the limit-map parameter. For the syntax of the limit-map parameter, see "Syntax: OLAP_TABLE Function".

Creating Type Definitions for Multidimensional Data

To create the type definitions that define the analytic workspace data as a table of objects take the following steps:

  1. Create a type definition for an object that represents a row in the table and whose attributes represents the columns of the table. Simplified syntax for this definition is shown below.
    CREATE TYPE object-name AS OBJECT (
       column-first     data-type,
       column-next      data-type,
       column-last      data-type);
    
    
  2. Create a type definition for a table of these objects. Simplified syntax for this definition is shown below.
    CREATE TYPE table-name AS TABLE OF object-name;
    

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