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

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

Defining Data Objects, 3 of 9


Defining Dimensions

Definition: Dimension

A dimension is an OLAP DML object that holds a list of values that provide the organization for one or more OLAP DML variables. A dimension value is similar to a key in a relational analytic workspace; it acts as an index to data. For example, if you have sales data with a separate sales figure for each month, then the data has a MONTH dimension; that is, the data is organized by month. The dimension values you add might be Feb98, Mar98, and Apr98.

Dimension values let you identify your data and provide an easy way to target the data you need for a particular purpose. When your users display or analyze your data, they select the values to work with.

Types of dimensions

OLAP DML supports both flat and hierarchical dimensions:

Note: When you define a variable using the SPARSE keyword, an internal object called a composite is automatically created. A composite shares some of the characteristics of a dimension and contains values that are combinations of values in other dimensions. For more information on composites, see "Defining Variables That Handle Sparse Data Efficiently".

Determining what dimensions to define

If you want your analytic workspace to contain only flat dimensions, you need to define dimensions for each level of detail in your data that users will access.

For example, if your company is divided into sales districts and each district handles several store accounts, then you need to decide whether you want sales figures for every store or only for each district. As shown in the following table, the answer to this question determines the structure of your analytic workspace.

IF . . .  THEN . . . 

you need store data, 

you can define a STORE dimension. 

you always look at each district as a whole, 

all you need is a DISTRICT dimension. 

you want to look at data both ways, 

you can organize data by store and view aggregates of data by district by creating both a STORE and a DISTRICT dimension with a relation between them. 

Sometimes, you will decide to store data of varying levels of aggregation within a single variable, because this type of storage affords a quicker response time for users who want to view the data. In this case, you need to define a hierarchical dimension.

For example, if you want to look at data both ways instead of defining both a STORE and a DISTRICT dimension as described above, then you can define a single hierarchical dimension. This hierarchical dimension would contain all of the values for stores and districts. If you dimension a variable by this hierarchical dimension then you can store data of varying levels of aggregation within that single variable. You can still view store data and district data separately.

How data for simple flat dimensions is stored

The data for a simple flat dimension is stored in a one-dimensional array. As you add values to the dimension, it stores each new value at the end of the array.

Example: How data for simple flat dimensions is stored

Assume that the PRODUCT dimension has been defined as a TEXT data type. The first three values that are added to the dimension are TENTS, CANOES, and RACQUETS. At this point, a report of the dimension shows the following values.

PRODUCT
--------------
TENTS
CANOES
RACQUETS

The values are actually stored as shown below.

PRODUCT Dimension 

Position 

Value 

TENTS 

CANOES 

RACQUETS 

Later, the values SPORTSWEAR and FOOTWEAR are added. At this point, a report of the dimension shows the following values.

PRODUCT
--------------
TENTS
CANOES
RACQUETS
SPORTSWEAR
FOOTWEAR

Now the dimension array looks like the following figure.

PRODUCT Dimension 

Position 

Value 

TENTS 

CANOES 

RACQUETS 

SPORTSWEAR 

FOOTWEAR 

Related information

For more information, see the following table.

IF you want documentation about . . .  THEN see . . . 

adding values to dimensions, 

Chapter 5

using dimensions in expressions, 

Chapter 4

reports, 

Chapter 12

defining dimensions, 

the entry for the DEFINE DIMENSION command in THE OLAP DML Reference. 


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