URL: http://www.firstbasesoftware.com/man/man5/autoindex.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[
Index of Contents] [
FirstBase RDBMS Overview]
The name of the file containing the list uses the basename of the database, with a .auto extension (as in dbase.auto). The index names are listed one per line. Each line can contain an optional unique flag, the flag -u, which causes the auto index to be checked for unique values at record write time from the FirstBase database editors.
All indexes are initialized at opendb(3) time and closed by the closedb(3) function. Each index must have an associated index dictionary (the index.idicti file). Furthermore, each index will be stored as a FirstBase Btree index, and will be a dense index, meaning all records of the database will be reflected in the index. In other words, these indexes are represent the full set of database records, not sub sets.
Within the database header structure, an array (b_autoindex) of fb_autoindex structure pointers is allocated, each containing all the elements needed for one Btree index. These automatic Btree indexes store their array of field pointers in b_autoindex[N]->ix_ip, where N means the Nth index.
These automatic indexes, although not tied to the default index within a database structure, are maintained during calls to addrec(3), putrec(3), and delrec(3). These indexes can be swapped into a database structure using useidx(3) so that calls to getxrec(3) use a particular index. Additionally, new indexes can be added to the autoindex array at run time using addidx(3).
This method of automatic indexes subsumes the older method of listing auto indexes within the database dictionary. As such, do not list auto indexes in the dbase.auto file which are also listed in the dbase.ddict file.