MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 21: OLE DB for OLAP Concepts


 

Describing the Axes

A dataset is a discrete collection consisting of data points dimensioned by the axes. In order to manipulate the dataset, the application must get information about the following:

The method IMDDataset::GetAxisInfo returns an array of structures, one structure for each axis. This structure, denoted as MDAXISINFO, has fields that contain the axis number, the number of dimensions on the axis, the number of coordinates on the axis, the number of columns corresponding to each dimension on the axis, and the name of each dimension projected on the axis. The field containing the dimension names is an array. The order of dimension nesting is implicitly contained in the order of dimension names that appear on this array; the outermost dimension appears first, and so on. IMDDataset::GetAxisInfo also returns the number of axes in the dataset. For more information about the structure of MDAXISINFO, see "MDAXISINFO Structure" in Chapter 22, "OLE DB for OLAP Objects and Schema Rowsets."

Axis Rowset

After the consumer obtains basic information about the axes, the next step is to get detailed information about the structure of each tuple on the axis. This means that the consumer must get the properties of each member of each tuple. (Recall that a tuple is made of one or more components and that each component is a member.) All this information is available as a rowset, called the axis rowset. There is one axis rowset per axis. You can retrieve an axis rowset by using IMDDataset::GetAxisRowset. This function takes as an argument the axis ordinal number and returns the corresponding axis rowset.

Each row in the axis rowset corresponds to a tuple on the axis. The first column of the axis rowset is called TUPLE_ORDINAL (see "Navigating Cells in a Dataset" for more information), which contains the ordinal number of the tuple that a given row corresponds to. The remaining columns contain member properties.

Whether or not you choose any member properties by using the DIMENSION PROPERTIES clause (see "Retrieving Member Properties" in Chapter 24, "Multidimensional Expressions"), the axis rowset always contains several properties for each dimension member, such as its unique name, the level to which it belongs, its display caption, and so on. For a list of these properties, see "Axis Rowsets" in Chapter 22, "OLE DB for OLAP Objects and Schema Rowsets."

One column for each property will be included in the axis rowset for each projected dimension on the axis. If you specify more properties for a dimension (by using the DIMENSION PROPERTIES keyword), those properties will appear as additional columns after the columns for the default properties for the dimension. The axis rowset for an axis contains as many rows as there are axis tuples. Calling IColumnsInfo on the axis rowset retrieves metadata such as the name and data type of the columns of the axis rowset.