An operator class tells the database server which data type (or types) it can index using a secondary-access method. The operator class must follow the requirements of the access method. The secondary-access method builds and accesses an index. An operator class associates a group of operators with a secondary-access method. When you extend an operator class, you provide additional functions that can be used as filters in queries and for which the database server can use an index.
The database server provides a default operator class for the built-in secondary-access method, a generic B-tree. This default operator class uses the relational operators (<, >, =, and so on) to order values in the generic B-tree. These relational operators are defined for the built-in data types.
To provide additional sequences in which the B-tree can order values in the index, you might want to create an additional operator class for the generic B-tree.
The default operator class provides only for built-in data types. You might want to extend an operator class to support an extended data type for the following reasons:
To extend or implement an operator class, you must define strategy and support functions that handle each extended data type you want to index. For more information, see Extending an Operator Class.
You must register each new operator class in the database with the CREATE OPCLASS statement. For information about this statement, refer to the IBM Informix: Guide to SQL Syntax.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]