MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 22: OLE DB for OLAP Objects and Schema Rowsets
Consumers can get information about the cubes, dimensions, hierarchies, levels, and members available from the data source object by browsing multidimensional schema rowsets using the IDBSchemaRowset interface.
The following schema objects are relevant for OLE DB for OLAP: catalogs, schemas, cubes, measures, dimensions, hierarchies, levels, members, and properties (for each dimension level). OLE DB for OLAP assumes that a multidimensional data store accessed by an MDP has catalogs, which contain schemas, which contain cubes. Of course, some providers might have only catalogs, only schemas, or neither. This is no different from the TDP case.
Schema rowsets are identified by GUIDs. The following table lists these GUIDs and the columns for which restrictions can be specified for each schema object on the schema rowset. The number of restriction columns for each schema rowset is defined as a constant prefixed with CRESTRICTIONS_ in the header files. Restriction values are treated as literals rather than as search patterns.
GUID |
Number of restrictions |
Restriction columns |
MDSCHEMA_CUBES | 3 | CATALOG_NAME SCHEMA_NAME CUBE_NAME |
MDSCHEMA_DIMENSIONS | 5 | CATALOG_NAME SCHEMA_NAME CUBE_NAME DIMENSION_NAME DIMENSION_UNIQUE_NAME |
MDSCHEMA_HIERARCHIES | 6 | CATALOG_NAME SCHEMA_NAME CUBE_NAME DIMENSION_UNIQUE_NAME HIERARCHY_NAME HIERARCHY_UNIQUE_NAME |
MDSCHEMA_LEVELS | 7 | CATALOG_NAME SCHEMA_NAME CUBE_NAMEDIMENSION_UNIQUE_NAME HIERARCHY_UNIQUE_NAME LEVEL_NAME LEVEL_UNIQUE_NAME |
MDSCHEMA_MEASURES | 5 | CATALOG_NAME SCHEMA_NAME CUBE_NAME MEASURE_NAME MEASURE_UNIQUE_NAME |
MDSCHEMA_PROPERTIES | 9 | CATALOG_NAME SCHEMA_NAME CUBE_NAME DIMENSION_UNIQUE_NAME HIERARCHY_UNIQUE_NAME LEVEL_UNIQUE_NAME MEMBER_UNIQUE_NAME PROPERTY_NAME PROPERTY_TYPE |
MDSCHEMA_MEMBERS | 12 | CATALOG_NAME SCHEMA_NAME CUBE_NAMEDIMENSION_UNIQUE_NAME HIERARCHY_UNIQUE_NAME LEVEL_UNIQUE_NAME LEVEL_NUMBER, MEMBER_NAME MEMBER_UNIQUE_NAME MEMBER_CAPTION MEMBER_TYPE Tree operator |
MDP-Supported GUIDs
The provider must support the following GUIDs if it lists itself as an MDP in the sources rowset returned by ISourcesRowset::GetSourcesRowset:
Some columns in schema rowsets are optional. If a provider does not support an optional column, it will return NULL for that column name in the schema rowset. Furthermore, a column can be mandatory and still contain NULL under certain circumstances. For example, the NUMERIC_SCALE column of the MEASURES rowset can be NULL if the data type of the measure is not DBTYPE_NUMERIC or DBTYPE_DECIMAL. Such cases are noted in the appropriate interface description.
All rowsets have mandatory columns, and some have optional ones. For a description of each, refer to the specific column name description in the following OLE DB for OLAP rowset topics:
Note The CUBE_NAME column in all schema rowsets except the CUBES rowset can be NULL. This does not mean that the provider does not support cubes; it means that the dimension, hierarchy, level, member, or property does not belong and is not owned by any cube. For more information, see "Hypercubes and Multicubes" in Chapter 21, "OLE DB for OLAP Concepts."
Most of the OLE DB for OLAP interfaces treat measures just like any other dimension. In fact, the Measures dimension appears in the DIMENSIONS rowset. The MEASURES rowset is really the MEMBERS rowset restricted by the Measures dimension. It appears separately because consumers are usually interested in special information about a measure—information that does not necessarily apply to the members of another dimension.
If a provider does not support the concepts of catalogs or schemas, it does not support the DBSCHEMA_CATALOG and DBSCHEMA_SCHEMATA rowsets. A consumer can call IDBSchemaRowset::GetSchemas to find out which schema rowsets are supported. If the provider does not support catalogs or schemas, specifying a restriction on either of these results in DB_E_NOTSUPPORTED.