MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 11: Integrated Indexes


 

Chapter 11: Integrated Indexes

OLE DB indexes are designed for use with base tables (tables opened by IOpenRowset::OpenRowset). Providers built over command processors, such as SQL query processors, are expected to use indexes internally but not expose them through OLE DB. The primary consumers of OLE DB indexes are the following:

OLE DB provides the ability to open separate rowsets over base tables and indexes, allowing the consumer to traverse each separately. However, certain providers can support indexes and base table data on the same rowset (also known as a clustered index). Providers can expose this as an integrated index by exposing IRowsetIndex directly on the base table rowset. This allows the consumer to set index ranges and seek index values directly on the base table rowset, without having a separate (and in this case redundant) index rowset. Such rowsets are said to have integrated index behavior. Providers can support separate indexes, integrated indexes, or both.

This chapter discusses requesting, using, and the structure of integrated indexes. The structure is more loosely defined than a nonintegrated index rowset. A useful element of integrated indexes, of course, is the ability to fetch data. The topic of row fetching includes rowset order, next fetch position, range, updating index rows, visibility of index changes, and the effect of changes on the next fetch position and index range. Accessors, the collection of information that describes how data is stored in the consumer's buffer, are discussed in light of methods and restrictions. Restrictions on integrated indexes and executing commands are discussed also. An integrated index code example is provided.

For more information on Go to
Nonintegrated indexes Chapter 10, "Index Rowsets"
Requesting integrated indexes "Requesting Integrated Indexes" in this chapter
Using integrated indexes "Using Integrated Indexes" in this chapter
Structure of integrated indexes "Structure of Integrated Indexes" in this chapter
Fetching rows "Fetching Rows" in this chapter
Accessor methods and restrictions "Accessors" in this chapter

"Accessors" in Chapter 6, "Getting and Setting Data"

Restrictions on integrated indexes and commands "Integrated Indexes and Commands" in this chapter

Chapter 3, "Commands"

Calling threads "Provider Threading Models" in Chapter 18, "Programming Considerations"