URL: http://www.firstbasesoftware.com/man/man5/idicti.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[
Index of Contents] [
FirstBase RDBMS Overview]
Formally, this file is edited using the dbdind(1) tool, and used by dbigen(1) to actually create the index.
This manual page describes the layout of index dictionary files so that creation of theses index files can be accomplished using a shell script or C program. Dbigen(1) will still need to be used to generate the actual index.
An index dictionary is a line oriented text file. Each line contains either a single character symbol marker, or a field name with selection values.
The symbols of the index dictionary are used to delimit 'And Trees' and 'Or Trees', with another symbol used to denote a 'Simple And' connection. Here is a list of the symbols and their meaning:
A special Simple And symbol, &, can appear in the middle of an Or Tree. This symbol will cause the upper and lower sub-sections of the 'Or Tree' to be connected with a logical And. In other words, use of the 'Simple And' implements a different precedence. For example, the 'Simple And' symbol allows selection logic of the form '(A OR B) AND (C OR D)'.
The two values on a Field Name line represent the endpoints of the range of accepted values for that Field. For example, a Field Name line of 'Field1 101 202' will match a record when the value of Field1 is greater than or equal to 101 and less than or equal to 202.
There are a few special Meta-Values that can also be used as Val1 and Val2. Val1 can have the meta-value $ALL or $NOT. If the value $ALL is used, Val2 is unused, and should be blank. If the value $NOT is used, a match only occurs if the contents of the field is not the value listed as Val2.
Val2 can be a meta-value also. $NONE will force an exact match using the Val1 value, while $PATTERN will cause Val1 to be used as a regular expression in attempting to match the contents of Field1 with Val1.
Alternately, Val1 and Val2 can be used to compare the Field Name value to another field value in each examined record. In this scenario, Val1 takes on one of the values $GT $LT, $GE, $LE, $EQ, or $NE. Val2 must then be a valid Field Name.
The second example below will select all records that have the contents of Field1 between 101 and 202 inclusive, and the contents of Field2 either between abc and def, or between xyz and zzz. In pseudo code, this selection translates to (Field1 >= 101 && Field1 <= 202) && ((Field2 >= abc && Field2 <= def) || (Field2 >= xyz && Field2 <= zzz)). The created index will contain (and be sorted by) Field1, Field2 and Field3.
The third example will select all records where the value of Field1 is greater than the value of Field2. The resulting index will be sorted by Field2. Note that it will not be a Btree index, but will instead be a flat index.
____________ Example 1: ____________ $ Field1 101 202 % Field1 % ____________
Example 2: ____________ $ Field1 101 202 $ # Field2 abc def Field2 xyz zzz # % Field1 Field2 Field3 % ____________ Example 3: ____________ $ Field1 $GT Field2 % Field2 ____________