Describing the Axes

OLE DB Programmer's Reference

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

  • Number of axes in the dataset
  • What tuples appear on a given axis and the number of tuples
  • Number of dimensions on each axis and their names
  • Number of coordinates on the axis

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 23: 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 25: 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 23: 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 names and data types of the columns of the axis rowset.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net