Compartilhar via


Structure of Integrated Indexes

The structure of a nonintegrated index rowset is rigidly defined: The key columns of the index occur in order, and there is a separate column ? not column 0 ? that contains the bookmarks that point to the base table rowset.

These restrictions do not apply to rowsets with integrated indexes. Forcing the key columns to occur in order could force the rowset to reorder the rowset columns each time the consumer changes the current index ? an unacceptable result. The separate column of bookmarks pointing to base tables is not needed, as was explained in the preceding section, "Using Integrated Indexes."

To determine which columns are key columns and the order in which they occur, the consumer calls IRowsetIndex::GetIndexInfo. The provider returns an array of DBINDEXCOLUMNDESC structures with the DBIDs of the key columns and the key types (ascending or descending) of each column. The arrays are returned in order from most significant to least significant. To determine the ordinals of the key columns, the consumer calls IColumnsInfo::MapColumnIDs with the returned DBIDs.