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


 

Chapter 21: OLE DB for OLAP Concepts

Microsoft® OLE DB for Online Analytical Processing (OLAP) is a set of objects and interfaces that extends the ability of OLE DB to provide access to multidimensional data stores and enables users to perform sophisticated data analysis through fast, consistent, interactive access to a variety of possible views of the underlying information. OLAP applications typically handle huge volumes of complexly interrelated data.

As a freely published specification and a developing industry standard for multidimensional data access, OLE DB for OLAP allows independent software vendors and corporate application developers to depend on a single interface for consuming multidimensional data, regardless of the vendor or source. With this technology, OLAP applications can uniformly access both relational and nonrelational data stored in diverse information sources, regardless of location or type.

Providers of multidimensional data can implement a single set of interfaces, which are described in this section of the OLE DB Programmer's Reference, that allow all OLAP clients to access their data. Consumers can use the COM query interface and data source properties to dynamically adapt to provider capabilities.

Note   OLE DB for OLAP version 1.0, released with OLE DB version 2.0, does not define any new interfaces or language clauses for updating cube schemas. However, providers can achieve the same effect by supporting existing mechanisms for updating rowsets in order to provide updatable schema rowsets. Vendors may also define proprietary language extensions for Data Definition Language (DDL) functionality.

This documentation assumes the audience has the following technical qualifications:

As shown in the following illustration, OLE DB for OLAP is designed as an extension of OLE DB that allows you to access multidimensional data stores. Depending on the specific type of data store, the way OLAP stores data is referred to either as relational OLAP (ROLAP), indicating relational data that is stored as a set of tables, or as multidimensional OLAP (MOLAP), indicating that the data is stored in inherently multidimensional structures.

Conceptually, multidimensional data is represented as a cube. The cube—or more appropriately, the hypercube—is also the central metadata object recognized by OLE DB for OLAP. It is expressed through the dataset object, which is specific to OLE DB for OLAP. Consumers can expose the data as rowsets by connecting to a tabular data provider (TDP) or a multidimensional data provider (MDP), as shown in the following illustration.

OLE DB for OLAP provides interfaces and methods for providers to expose multidimensional schemas and consumers to view those schemas. Multidimensional schemas are composed of a set of cubes that can be viewed and manipulated as rowsets. A set of schemas can be grouped together into a catalog, but the schema's foundation is the cube. Each cube has a set of dimensions, composed of a set of members, that allows the metadata to be accessed. The members of a dimension can be consolidated or aggregated along any number of hierarchies. Each hierarchy is composed of different levels. For information about how OLE DB for OLAP exposes and uses these schemas, see "Multidimensional Schemas."

An OLE DB for OLAP provider is initialized like any OLE DB provider. Enumerators are used to locate MDPs and create OLE DB data source objects, which are then used to create session objects. However, in OLE DB for OLAP, the consumer must be able to easily determine the type of a given data source object—whether TDP, MDP, or both.

For specifying a dataset object, OLE DB for OLAP defines a rich syntax, called multidimensional expressions (MDX), which can be viewed as a set of macros defined on top of the SQL language. Although these macros are generally useful for querying a multidimensional data store, their precise semantics are defined by means of their SQL language mappings.

Execution of a user's query results in a dataset object. Dataset objects consist of a set of value points, or cells, taken from the data store cube (or cubes) and built into the dataset cube. This is similar to a query in a relational database system where the query encompasses one or more tables and returns a result set that has the same structure as that of a table.

Once a dataset is created—and therefore exists as one or more cubes—it is often necessary or advantageous to obtain a flattened view of the data. The process of flattening a dataset to produce a rowset can create a variety of views in tabular, rowset form.

In a range rowset, each row corresponds to a cell in the dataset. Each selected cell property appears as a column in this rowset. When a cell—or more precisely, when cell data—requires updating, it is actually the range rowset that is updated by using methods similar to those used on any other OLE DB rowset. For more information, see "Working with Cell Data."