Indexes are additional files for a database table that enable fast searching and sorting. TurboDB indexes are built on either a list of field names or an expression to define the sorting order. If an index is declared to be unique, records that would create a duplicate key in the index are not accepted. Another form of indexes are full-text indexes.
Indexes Based on a Field List
These indexes are sorted in the order of the first field in the field list. If two records have the same value for the first field they are sorted after the second field of the field list and so on. There can be up to 10 fields in the index field list. Every field can be sorted in ascending or in descending order.
Indexes Based on an Expression
These indexes are sorted after the value of an arbitrary expression that can be up to 40 characters long. If the expression is of string type, the index is sorted like if the expression values were values of a string column. If the expression is of
numeric type, the index is sorted according to normal numeric order.
Full-Text Indexes
A full-text index enables the user to search for a keyword or a set of keywords in any field of the table. Full-text indexes in TurboDB are not real database indexes but additional database tables that are linked in a many-to-many relation to the base table.