NAME

tdbadd - insert records into a temporal relation

SYNOPSIS

tdbadd [ -123p ] file [ attribute ]

DESCRIPTION

Tdbadd inserts records read from standard input into the temporal relation stored in file.

If file does not exist it will be created.

The temporal relation in file is a Btree with each entry containing the fields transaction time, valid time, element, and attribute.

Input fields are separated by tabs, and records are separated by lines. The input fields are the same as those for the temporal relation, but with tranasaction time, valid time and attribute optional. Transaction time and valid time default to the current time if they are not read from input.

The possible combination of inputs are the following:
1 fieldelement
2 fields

element attribute
3 fields
valid-time element attribute
4 fields
transaction-time valid-time element attribute

If an attribute value is supplied on the command line, it is used in place of any attribute value from standard input.

There are three possible inversions in which to store the entry. The entry is added to each inversion specified as an option.

The -p option prints the records that are inserted to standard output, so the command can appear in the middle of a pipeline.

Each entry in a relation should be unique on the four fields, though this is not enforced. To delete an entry add another entry with identical valid-time, element, and attributes values. The validity of time, element, and attribute triads is toggled along the transaction time line.

EXAMPLES

Store a description for all files in the current directory.
9ls |tdbadd -123 desription 'temporal database source code'

SEE ALSO

tdbjoin(1)