Managing User-Defined Indexes
Indexes allow you to find data within a database easily. Indexes define the order that data is sorted.
Abacus includes several indexes, but if you are using the Advanced edition of Abacus, you can also create your own custom indexes for the Names, Events and Matters databases. The indexes you create will be maintained by Abacus and will always be available for custom reports as well as for viewing records in windows and browses.
IMPORTANT: Before you add, edit or delete indexes make sure that no on else is using Abacus.
The most powerful element of user-defined indexes is the query optimization that occurs. If you regularly use queries that access a particular field like the Names database Attorney field, you should create an index on that field. Later, when you use a query that tests for something like "Attorney starts with 'M'", Abacus will instantly find these records rather than having to scan the whole database!
You manage user-defined indexes from the User-defined Indexes window. To open the window, select File > Setup > User Indexes.
From this window do any of the following to complete or maintain indexes.
To add/edit a user-defined index
-
Do one of the following:
-
To add an index, click Add.
-
To edit an index, highlight the index and click Edit.
-
-
The Index Properties window appears. Complete/edit the window as follows:
-
Database: Click the Lookup button and select the extra database you want to index.
-
Index name: Enter the index name. Can be up to 10 characters, but only use letters, digits and/or underscores (_). For example, LAST_FIRST. Usually, the name of the index should be the name of the field you are indexing. For example, if you are indexing on DOB, then the Index name should be DOB. IMPORTANT: For extra databases, the index name must exactly match the field name.
-
Index key: Click the Lookup button and highlight the field on which you want to sort and click OK. The Field List window appears. Select whether or not you want to add more fields to the key (Abacus will concatenate them together for you). When you select No, The Index Properties window reappears. Be sure any character fields are surrounded by the UPPER() function--otherwise query optimization cannot occur, and searches will be case sensitive. NOTE: When editing an Index Key, you can add fields together to create any valid xBase character expression. A simple example: UPPER(COURT). A more complex example: UPPER(LAST)-","-(" "+UPPER(FIRST)).
-
Condition: Enter the condition you want to use to limit the index to show only certain types of records. For experts only. To change, click the lookup button for Condition. The User-Defined Queries window appears. Select the condition you want to use to limit the index to show only certain types of records and click OK. The condition must be a valid LOGICAL expression. For example, if you want a "AMS_CLNTS" index to only include clients for attorney AMS, you would have a condition of "NAMES->CLASS='CLIENT' .AND. NAMES->ATTORNEY='AMS'". (You would probably do the index Key on the last name plus the first name). When a user selects this index, only AMS's clients will appear, in name order.
NOTE: This option is seldom used. When an index with a condition is used, the database appears to only contain the matching records. Such an index can never show the entire database! It is great if you have a huge database and want very fast access to a group of records that is used regularly, but where using a normal query would be too slow. Also, indexes that have a condition will NOT be used for query optimization. Even though they give you instant access to the info you specify in these index properties, the index cannot be used to speed up other queries that reference the fields of this index key. -
Unique: When selected, only unique records appear in the index search results. For example, if you index by name and two records have the same name, only the first record will appear. This is an unusual property that you will probably never use, but it is necessary for some types of sophisticated database access.
-
Descending: When selected, the index search results appear in descending (reverse) order. This is useful for dates where the latest items appear at the top.
-
-
Click Done to save your additions/changes.
To delete a user-defined index
Highlight the index you want to delete and click Delete.
To rebuild a user-defined index
Highlight the index you want to rebuild and click Re-Index. The index will be rebuilt when you close the window.