clsCube

An object of ClassType clsCube provides a specific implementation of the MDStore interface of the Decision Support Objects (DSO) library. Each instance of clsCube provides collections, methods, and properties through the MDStore Interface.

Remarks

A cube object is the primary data storage mechanism in Microsoft® SQL Server™ OLAP Services. In general, a cube contains measures, dimensions, and partitions. For more information about the object model hierarchy, see About Decision Support Objects and Interfaces.

A cube object with a SubClassType of sbclsVirtual is a virtual cube. A virtual cube is used to encapsulate a subset of the measures, dimensions, and levels contained in a group of cubes. A virtual cube, like a view in a relational database, is a logical construct that contains no data. Just as a view is a join of multiple relations, a virtual cube is a join of multiple cubes.

The basic model for using virtual cubes is that you add them to a database as a cube with the optional SubClassType parameter set to sbclsVirtual, and then add dimensions and measures to them as needed. However, the dimension and measures are derived from previously defined cubes within the database rather than a dimension table. Any levels associated with a dimension you add to a virtual cube automatically apply to the dimension in the virtual cube. Partitions and aggregations do not apply to virtual cubes.

If you add or remove a dimension or dimension from a virtual cube, you must reprocess the virtual cube for the change to affect the OLAP server operations. The same holds true if you remove a dimension or measure from a cube after assigning it to a virtual cube, or if you remove a dimension or measure from a database after assigning it to a cube or virtual cube.

Example

Use the following code to create an object of ClassType clsCube:

' Assume an object (dsoServer) of ClassType clsServer exists

' and contains a database in its MDStores collection

Dim dsoDB As DSO.MDStore

Dim dsoCube As DSO.MDStore

Set dsoDB = dsoServer.MDStores(1)

Set myCube = dsoDB.MDStores.AddNew("MyCube")

'Set properties and add dimension, levels, and measures

'Create virtual cube

Dim dsoVCube as DSO.MDStore

Set dsoVCube = dsoDB.MDStores.AddNew("MyVCube", sbclsVirtual)

'Add measures, set properties, and add dimension

See Also
Using Decision Support Objects MDStore Interface

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.