Platform SDK: Exchange 2000 Server

Schema Search Sequence

[This is preliminary documentation and subject to change.]

The Web Store schema search engine sequence is as follows.

  1. In the application folder, get the list of content classes in the expected-content-class property, and get the location of its schema folder from the schema-collection-ref property.

    The application folder is either the folder specified in the SQL query’s FROM clause, or the current folder.

  2. In the schema folder, find the content class definitions for the expected content classes. Starting with the first content class definition encountered, construct a list of its properties and append to the list properties of other content classes as they’re encountered. Find the property definitions for each property. This folder can be considered the root of a tree of schema folders defined in the scope.
  3. If there are any missing content class or property definitions, follow the URLs to other folders identified by the schema folder’s baseschema property. If necessary, examine the baseschema property in other schema folders for additional URLs to locate schema. Continue in this manner until all required content class and property definitions are found or the entire tree has been searched and exhausted.

With this referral mechanism, you can create a tree of schema folders. The SQL engine follows the tree, searching for schema information until it has satisfied all content class inheritance dependencies and has constructed the list of properties. The Web Store uses this list for constructing a recordset for a SQL search result, or for an enumeration of an item’s Fields collection.

Caution   One or more definitions of the same name can exist in the Web Store for both content classes and properties, but only the first encountered definition is the one used.

Search Algorithm

The search algorithm that the Web Store SQL search engine employs is a breadth-first search of schema folders in the tree. To illustrate, the following figure depicts the search sequence given these baseschema configurations:

A breadth-first search is: search A, then B and C, then D, E, and F. This algorithm is not recursive-descent, such as A, B, D, E, C, F.

Note that the tree is defined by using URLs in properties for each folder. The tree need not, and normally does not, correlate to the actual folder hierarchy in the Web Store.