Browsing Metadata

OLE DB Programmer's Reference

Consumers can get information about the available cubes, dimensions, hierarchies, levels (including level properties), members, and member properties by using the IDBSchemaRowset interface to browse. Because IDBSchemaRowset is an interface on the session object, the consumer must have a session object before it can browse for metadata.

OLE DB for OLAP defines schema rowsets for the following metadata objects:

  • Actions
  • Catalogs
  • Cubes
  • Dimensions
  • Hierarchies
  • Levels
  • Measures
  • Members
  • Properties (for each dimension level)
  • Schemas
  • Sets
Note   OLE DB for OLAP rowsets for catalogs and schemas are the same as for OLE DB.

Each schema rowset is identified by a GUID. IDBSchemaRowset::GetRowset takes this GUID as an argument and returns the requested schema rowset.

A schema rowset for a given metadata object has one row for every instance of that object present in the schema. For example, if there are five cubes available in the schema, the CUBES rowset has five rows. Each column of a schema rowset provides one piece of information about that object. As shown in the following table, the CUBES rowset has 11 columns, each of which provides a different piece of information about the cube.

Column name Information conveyed about the cube
CATALOG_NAME Name of the catalog to which this cube belongs.
SCHEMA_NAME Name of the schema to which this cube belongs.
CUBE_NAME Name of the cube.
CUBE_TYPE Indicates either a regular cube or a virtual cube.
CUBE_GUID Cube GUID.
CREATED_ON Date and time of cube creation.
LAST_SCHEMA_UPDATE Date and time of last schema update.
SCHEMA_UPDATED_BY User ID of the person doing the last schema update.
LAST_DATA_UPDATE Date and time of last data update.
DATA_UPDATED_BY User ID of the person doing the last data update.
DESCRIPTION A meaningful description of the cube.

It is not always desirable to retrieve information about all instances of a metadata object. For example, an application typically needs the dimensions belonging to a single cube rather than all dimensions available in the schema. Therefore, OLE DB defines a generic method to restrict a schema rowset based on certain conditions, called restrictions. Each schema rowset has a defined set of restrictions, which are typically conditions on one column of a schema rowset. For example, the DIMENSIONS rowset can be restricted by the following properties: CATALOG_NAME, SCHEMA_NAME, CUBE_NAME, DIMENSION_NAME, and DIMENSION_UNIQUE_NAME.

One of the arguments to IDBSchemaRowset::GetRowset is an array of restrictions. This array has as many elements as the number of restrictions on the particular schema object. For example, the number of restrictions on the DIMENSIONS schema rowset is five. To restrict the DIMENSIONS rowset to contain only dimensions belonging to a particular cube, the application puts the cube name into the third element of the restrictions array.

For detailed information about restrictions in OLE DB for OLAP schema rowsets, see "Additions to IDBSchemaRowset" in Chapter 23: OLE DB for OLAP Objects and Schema Rowsets.

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