The MDStore interface is implemented by objects in Decision Support Objects (DSO) that contain multidimensional data. The following table describes these objects.
Object | Description |
---|---|
Database | An object that represents a database on the Analysis server. Databases contain cubes, dimensions, mining models, and roles. |
Cube | An object that represents a cube on the Analysis server. Cubes contain dimensions, measures, and commands. |
Partition | An object that represents the physical storage for the data in a cube. Partitions contain dimensions, measures, and aggregations. |
Aggregation | An object that represents the tables of aggregated (that is, precalculated) data in a cube. Aggregations contain dimensions, measures, and member properties. |
Although all of these objects implement their own internal interfaces, the MDStore interface is the primary interface to be used when using these objects. To differentiate between the objects implementing the MDStore interface, the ClassType property is used. The following table lists the objects implementing the MDStore interface and associated ClassType property values.
Object | Class type |
---|---|
Database | clsDatabase |
Cube | clsCube |
Partition | clsPartition |
Aggregation | clsAggregation |
The relationships among these objects are maintained through hierarchical linkages using the MDStores collections of each of these objects and the server object. The MDStores collection of a server object contains database objects. Database objects contain cube objects. Cubes contain partitions, and partitions contain aggregations. Together, the MDStore interface and the MDStores collections establish and maintain the hierarchy that defines the structure of OLAP data.
The MDStore interface provides collections, methods, and properties to manipulate these objects, their contained objects, and data. The four objects that implement the MDStore interface do not necessarily implement all of the MDStores collections, properties, and methods. For example, only objects of ClassType clsDatabase have MiningModels collections. Also, some MDStore properties and collections may be restricted to read-only access by some objects. For example, an object of ClassType clsDatabase allows read/write access to its DataSources collection, whereas access to the DataSources collection of an object of ClassType clsAggregation is read-only.
You create objects that implement the MDStore interface by declaring a variable as an MDStore data type and then creating an instance of the object and adding it to the MDStores collection of another object. The AddNew method of the MDStores collection creates the instance, sets the object's name to the name you provide, adds the object to the collection, and sets its parent property to reference the owner of the collection. At the same time, the new object's ClassType is automatically initialized to the appropriate value depending on the object's parent. For example, if you use the AddNew method to create an object in a cube's MDStores collection, the new object's ClassType will be set to clsPartition.
For more information about DSO, see Introducing Decision Support Objects and Interfaces.
The following examples walk through the hierarchy of usage for the MDStore object. First, a server object is created, which contains an MDStores collection of databases. Next, a database is created in the server's MDStores database collection. Then, a cube is created in this new database's own collection of MDStores objects. The same process continues by creating a new partition and a new aggregation using the same method. Each time, an interface (or placeholder) is defined to hold an MDStore object. Then the AddNew method of the parent object's MDStores collection is used to create the MDStore object.