MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 1: Overview of OLE DB


 

Consumers and Providers

Described in COM terms, an OLE DB consumer is any piece of system or application code that consumes an OLE DB interface. This includes OLE DB components themselves. An OLE DB provider is any software component that exposes an OLE DB interface.

OLE DB interfaces may be directly exposed by a data store or exposed by a separate piece of code that communicates at a lower level with an interface on the data store. In either case, the code that exposes the OLE DB interfaces is referred to as the data provider. In some cases, a data provider won't own data at all but will use another OLE DB data provider as its store, exposing custom behavior on top of that data provider. Such providers are often called custom providers. Examples of data providers include relational DBMSs, storage managers, spreadsheets, ISAMs, and e-mail.

A service component is an OLE DB component that implements a common set of OLE DB functionality—for example, IRowsetFind—on top of any provider. Service components, where available, are automatically invoked by the Service Component Manager, included as a core component of the Microsoft Data Access Components (MDAC) SDK, when a consumer requests some OLE DB functionality that is not supported by the data provider.

Component DBMSs offer the potential for greater efficiency than traditional DBMSs because consumers generally require only a portion of the database management functionality offered, thereby reducing resource overhead. OLE DB allows simple tabular data providers to implement functionality native to their data store. At a minimum, they can use only the interfaces that expose data as tables. This opens the opportunity for the development of query processor components, such as SQL or geographical query processors, which can consume tabular information from any provider that exposes its data through OLE DB. In addition, SQL DBMSs can expose their functionality in a more layered manner by using the OLE DB interfaces.

The following section describes the architecture and main interface areas of OLE DB.