Additions to IDBSchemaRowset

OLE DB Programmer's Reference

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_ACTIONS 7 CATALOG_NAME
SCHEMA_NAME
CUBE_NAME
ACTION_NAME
ACTION_TYPE
COORDINATE
COORDINATE_TYPE
MDSCHEMA_CUBES 3 CATALOG_NAME
SCHEMA_NAME
CUBE_NAME
MDSCHEMA_DIMENSIONS 5 CATALOG_NAME
SCHEMA_NAME
CUBE_NAME
DIMENSION_NAME
DIMENSION_UNIQUE_NAME
MDSCHEMA_FUNCTIONS 4 LIBRARY_NAME
INTERFACE_NAME
FUNCTION_NAME
RESTRICTIONS
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_NAME
DIMENSION_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_NAME
DIMENSION_UNIQUE_NAME
HIERARCHY_UNIQUE_NAME
LEVEL_UNIQUE_NAME
LEVEL_NUMBER
MEMBER_NAME
MEMBER_UNIQUE_NAME
MEMBER_CAPTION
MEMBER_TYPE
Tree operator
MDSCHEMA_SETS 5 CATALOG_NAME
SCHEMA_NAME
CUBE_NAME
SET_NAME
SCOPE

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:

  • MDSCHEMA_CUBES
  • MDSCHEMA_DIMENSIONS
  • MDSCHEMA_HIERARCHIES
  • MDSCHEMA_LEVELS
  • MDSCHEMA_MEASURES
  • MDSCHEMA_MEMBERS
  • MDSCHEMA_PROPERTIES
  • MDSCHEMA_SETS

Support for MDSCHEMA_LEVELS is not required if the provider has set the MDPROP_NAMED_LEVELS property to MDPROP_NL_UNSUPPORTED. The provider can also ignore level-based restrictions in schema rowsets such as PROPERTIES or MEMBERS.

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.
Note   The CUBE_NAME column in all schema rowsets except the ACTIONS and 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 22: 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 or DBSCHEMA_SCHEMATA rowset. 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 returns DB_E_NOTSUPPORTED.

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