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

Creating and Using Analytic Workspace Metadata, 6 of 7


Metadata That Describes Dimension Attributes

What are attributes?

Attributes relate the dimension values in one OLAP DML dimension to the dimension values in another OLAP DML dimension.

An attribute has a domain dimension and a range dimension.

The domain dimension is the dimension about whose dimension values an attribute supplies information.

The range dimension values provide information about the domain dimension.

For example, suppose you define a PRODUCT dimension. One attribute is the color of each product. Therefore, you define a COLOR dimension to store the names of colors. PRODUCT is the domain dimension, and COLOR is the range dimension.

Any OLAP DML object can represent more than one analytic workspace attribute. Each unique mapping of domain and range dimensions to the dimensions of the object is a separate attribute.

Metadata that is required for the display of attributes

If a dimension has attributes and you want to display them, then the following metadata is required:

Set the DBATTRDIM property on the ECMLOCATOR object

You must set the DBATTRIDIM property on the ECMLOCATOR object in order to make it possible for attributes that exist in the analytic workspace to be found.

For details, refer to "Set the DBATTRDIM property to identify the workspace's attributes".

Set the DOMAINDIMREL property on the attribute dimension

Define a relation that holds the dimension that acts as domain of an attribute, then set the DOMAINDIMREL property on the attribute dimension.

Defining the attribute domain relation

The following example defines an attribute domain relation that relates the attribute dimension to the dimension dimension. For information about defining the dimension dimension, see "Set the DBDIMDIM property to identify the workspace's dimensions". For information about defining the attribute dimension, see "Set the DBATTRDIM property to identify the workspace's attributes".

define attrdomain relation dbdimdim <dbattrdim>

The dimension dimension, dbdimdim, contains the names of the dimensions in the analytic workspace. The attribute dimension, dbattrdim, contains the names of the dimensions that you have defined to store attribute values. You then store the name of the domain dimension in the relation. For information about defining and using relations, refer to the DEFINE RELATION command in the OLAP DML Reference.

Setting the DOMAINDIMREL property

After you have defined the attribute domain relation, then you can set the DOMAINDIMREL property on the attribute dimension.

For example, the following code sets the DOMAINDIMREL property on the DBATTRDIM dimension and specifies the relation named ATTRDOMAIN:

consider dbattrdim
property 'DOMAINDIMREL' 'attrdomain'

Set the RANGEDIMREL property

Define a relation that holds the dimension that acts as range of an attribute, then set the RANGEDIMREL property on the attribute dimension.

Defining the attribute range relation

The following example defines an attribute range relation that relates the attribute dimension to the dimension dimension. For information about defining the dimension dimension, see "Set the DBDIMDIM property to identify the workspace's dimensions". For information about defining the attribute dimension, see "Set the DBATTRDIM property to identify the workspace's attributes".

define attrrange relation dbdimdim <dbattrdim>

The dimension dimension, dbdimdim, contains the names of the dimensions in the analytic workspace. The attribute dimension, dbattrdim, contains the names of the dimensions that you have defined to store attribute values. You then store the name of the range dimension in the relation. For information about defining and using relations, refer to the DEFINE RELATION command in the OLAP DML Reference.

Setting the RANGEDIMREL property

After you have defined the attribute range relation, then you can set the RANGEDIMREL property on the attribute dimension.

For example, the following code sets the RANGEDIMREL property on the DBATTRDIM dimension and specifies the relation named ATTRDOMAIN:

consider dbattrdim
property 'DOMAINDIMREL' 'attrrange'

Set the EXPOBJVAR property on the attribute dimension

Define a variable that holds the names of the attributes (which are typically relations) in the analytic workspace, then set the EXPOBJVAR property on the attribute dimension.

Defining the attribute name variable

An attribute is usually a relation between a dimension (such as PRODUCT) and a second dimension that holds descriptions (such as COLOR). For example, the second dimension holds names of colors that describe products.

The following is an example of a definition of a relation between COLOR and PRODUCT:

define color.product relation color <product>

The next example defines a variable that will store the names of the attributes in the analytic workspace. The variable has a text data type and is dimensioned by the attribute dimension. For information about defining the attribute dimension, see "Set the DBDIMDIM property to identify the workspace's dimensions".

define attrexpobj variable text <dbattrdim>

You add the names of the attributes as the data to the variable and populate them. For example, after adding the name PRODUCTCOLOR to the ATTREXPOBJ variable, you can then assign the relation to it, as shown in the following example:

attrexpobj(dbattrdim 'PRODUCTCOLOR') = 'color.product'

Setting the EXPOBJVAR property

After you have defined the attribute name variable, then you can set the EXPOBJVAR property on the attribute dimension.

For example, the following code sets the EXPOBJVAR property on the DBATTRDIM dimension and specifies the variable named ATTREXPOBJ:

consider dbattrdim
property 'EXPOBJVAR' 'attrexpobj'

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