Defining an Ad Hoc Index

The use of query indexes removes the need to reorganize the main database when new indexes are created or dropped. However, as changes to the production database could impact defined indexes, changes to a class and its properties are decoupled from the ad hoc index definition and no checking is done against the ad hoc indexes before allowing a schema change.

The following diagram illustrates the ad hoc index structure and process.

Before an ad hoc definition is used, it is validated against the existing schema and class definitions. If the definition is no longer valid or the key definitions have changed, the ad hoc index is ignored in regard to maintenance of the collection entries and for any ODBC use. If the ad hoc index has become invalid and has been built, the dictionary must be first dropped and the definition must be updated or at least saved again, to verify that the definition structure is correct.

The Ad Hoc Index Browser uses a red background in the index status column and to indicate that an index has become invalid or that it needs attention. This red background occurs on the indexes status column and the column elements (membership class or keys) that need attention. Text also explains what has changed and what action is required to restore the index.

All access to the schema, membership class, and properties is performed by name.

At the end of instantiation (validation) during a reorganization, the reorganization application examines all indexes and performs definition validation for all online indexes and marks any that are broken.

Use the Browse menu Ad Hoc Indexes command from a user-defined schema to define an ad hoc index for the current schema. Each schema within the JADE database can have a collection of ad hoc indexes.

The Relational Views Browser enables you to maintain your relational views only. To access the JADE data in the relational view using SQL select statements, you must first write your own inquiry programs. For details, see "SQL Examples", in Chapter 2 of the JADE External Interface Developer’s Guide.

To open an Ad Hoc Indexes Browser window

An Ad Hoc Indexes Browser window, shown in the following image, is then opened. If you have not yet defined an ad hoc index or loaded an existing ad hoc index definition, nothing is displayed in the Ad Hoc Index Browser.

Each ad hoc index in the table displays the:

To change or manipulate an existing index, select the index row in the browser.