URL: http://www.firstbasesoftware.com/man/man1/dbigen.htm
Last modified: 4 April 1996
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]


NAME

dbigen - generate a FirstBase index

SYNOPSIS

dbigen [-b] [-c] [-f] [-n] [-r] [-y] [-B] [-d database] [-i index] [-x xref-index] [-btree]

DESCRIPTION

Dbigen generates a FirstBase Btree+ index or a Normal or Flat index using an index generator dictionary defined via dbdind(1). This index dictionary is traversed during index generation to selectively determine which records are to be included in the index being built.

The default type of index defined via dbdind(1) is a Btree+ index. However, by using the -btree command line flag, dbigen(1) can be forced to create a Btree+ index even when the dictionary represents a normal index.

For more information on the selection criteria in the index dictionary, see the discussion in dbdind(1).

Note that dbigen(1) can detect when an index is already up to date. In this case, an index will not be generated. Override this with the -f (force) option.

The -B flag will enable the fastest throughput of records from the database. However, since the database map is not followed when this option is used, the database must be clean (as in dbclean(1)), with no free list entries. (See database(4)). If this flag can be used, the index generation is speeded up a great deal by internal record buffering. Note that no cross reference index can be used with record buffering, and that record locking is disabled.

The -b flag will run the FirstBase tool in batch mode, suitable for shell scripts. This mode produces no output on the terminal, thus can also be used when running the process in the background. The -y flag will run the tool at the terminal without pausing to ask the user if existing files can be destroyed and without displaying a 'picture' of the requested task.

The -c flag is for case-insensitive searching. All tests for string matches, both normal and regular expressions, are done using UPPERCASE so that matches are case insensitive.

The -f flag is used to force dbigen(1) to run -- even if it thinks it does not need to. Use of this flag is equivalent to runing rmidx(8) before running dbigen(1).

When using the regular expression pattern matching mechanism, some machines allow the meta character '.' to match a newline character and some do not. Typically, BSD UNIX allows this match and UNIX System V does not. The -n flag can be used to force FirstBase running on System V UNIX to map newlines to blanks so that the '.' within regular expressions will match a newline.

The -r flag will cause dbigen to report the actual number of records selected -- written to the standard output -- even when the process is run in batch mode.

Dbigen(1) parses the index dictionary and displays an image of what it will generate. The user can abort at this point if necessary.

The -x command line option can be used to enter the name of an existing FirstBase index to use in building the new index. If this existing index is to be used to process the database to build the target index, and if this existing index is out of date, an attempt is made to automatically update it first.

Thus, when using the -x option, the existing index becomes a cross reference index. Without this option, the entire FirstBase database is used to select and build the requested index.

After successful index generation, the index is sorted automatically. The standard UNIX sort facility, sort(1), is used for this task.

Note: date field indexes are reformatted before being written to the index to enable the system sort to work properly. The internal representation of indexed dates is YYMMDD (year/month/day) instead of the normal MMDDYY. This is meant to be transparent to users.

All NEWLINE characters in the sort by strings are converted to BLANKs.

EXAMPLES

To run a simple interactive dbigen, use

dbigen -d dbase -i index

To run this in batchmode, providing a second index to work from, use:

dbigen -b -d dbase -i index -x xindex

FILES

dbase
default name for the FirstBase database.

index
default name for the FirstBase index.

*.idicti
dictionary for index generator.

*.idict
index header information.

*.cdb
FirstBase database.

*.idx
FirstBase index.

*.map
record map of FirstBase database.

SEE ALSO

dbdind(1), dbedit(1), sort(1), dbfilter(1), firstbase(5), rmidx(5)

FirstBase User's Guide and Reference Manual

DIAGNOSTICS

If the index file already exists, dbigen(1) will pause and ask permission to overwrite it, unless batch mode or yes mode is indicated, in which case dbigen will assume it is ok to overwrite the existing index.


URL: http://www.firstbasesoftware.com/man/man1/dbigen.htm
Last modified: 4 April 1996
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]