Skip Headers

Oracle9i OLAP Developer's Guide to the OLAP DML
Release 2 (9.2)

Part Number A95298-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, 5 of 11


Defining Dimension Surrogates

A dimension surrogate is an object that provides an alternative way to specify the positions of a dimension. As described in "How Data For Simple Flat Dimensions Is Stored", each value of a dimension is identified by a position in the dimension. The position is specified by an integer. For an INTEGER type dimension, the values and the positions are the same. In a LIMIT command or a qualified data reference (QDR) you can use the value of the dimension or the position of the value in the dimension. For example, the following commands both set the status of the product dimension to the same value.

LIMIT product TO 'TENTS'
LIMIT product TO 1

A primary key column in a relational table might have values that are numbers. To efficiently load data from the relational structures into your analytic workspace, you can define a NUMBER dimension to contain the primary key values. NUMBER dimensions are different than other types of dimension because you cannot specify a value of a NUMBER dimension by its position in the dimension. However, you can define an INTEGER type dimension surrogate for the NUMBER dimension and use the values of the surrogate in LIMIT commands, models, QDRs, and data loading instead of using the primary key values from the NUMBER dimension.

You can define dimension surrogates for simple dimensions and for conjoints but not for concat dimensions or composites. For example, you might want to have a conjoint dimension but also want to have a single text value to specify each value of the conjoint. You can accomplish that by creating a TEXT dimension surrogate for the conjoint dimension. If you define a dimension surrogate for a conjoint dimension, then you cannot convert the conjoint dimension to a composite dimension.

You can define any number of dimension surrogates for a dimension. The type of the dimension surrogate does not have to be the same as the type of the dimension. You can define a dimension surrogate for any type of dimension other than the time types DAY, WEEK, MONTH, QUARTER, or YEAR. However, these time types are provided only for compatibilty with earlier versions. Using them is not currently recommended.

Differences Between Dimensions and Dimension Surrogates

You cannot dimension an object by a dimension surrogate. However, you can dimension an object, such as a variable, by a dimension, define a dimension surrogate for the dimension, and then use the values of the surrogate instead of the dimension in LIMIT commands, models, QDRs, and data loading.

You cannot define a valueset on a dimension surrogate. However, you can define a valueset on a dimension, define a dimension surrogate for the dimension, and then specify values for the valueset by using values of the surrogate in a LIMIT command.

You cannot define a relation on a dimension surrogate. However, you can define dimension surrogates for the dimensions that dimension a relation and then use the values of the surrogates in LIMIT commands or QDRs.

You cannot use a surrogate as the data type of a program or a formula.

You cannot add new positions directly to a dimension surrogate. However, with the MAINTAIN command you can add values to the dimension on which you have defined the surrogate. The surrogate then automatically has a new position for each value you that add to the dimension.

A dimension surrogate does not have its own status. It shares the status of its dimension. You can uses the values or positions of a dimension surrogate or its dimension with a LIMIT command or a QDR to set the status of the dimension and the dimension surrogate.

You cannot delete a dimension if a dimension surrogate exists for that dimension. However, you can delete the dimension surrogate without affecting the dimension.

You cannot use the PERMIT command on a dimension surrogate. A surrogate has the permissions set on its dimension.

You cannot use a dimension surrogate in commands that use the ACROSS or DOWN keywords to loop over, total over, or report over specified dimensions. In those cases, you must specify the dimension and not a surrogate for it.

You cannot use the CHDGFN or MAINTAIN commands on a dimension surrogate. However, you can use dimension surrogate values in a MAINTAIN command to specify values for a dimension.


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