man page(1) manual page
Table of Contents


qedit - Edit a list of tuples in the qddb Database, given a list of keys and set operations.


qedit l|e RelationDirectory [SearchString1] [-r Regexp] [-n Numeric] [-sr String1-String2] [-nr Number1-Number2] [-a SearchString2] [-o SearchString3]


qedit(1) lists (l) or edits (e) all tuples in RelationDi_rectory matching SearchString1. -a SearchString2 takes the set intersection of all tuples matching SearchString1 and those matching SearchString2. -o takes the set union. -r searches for any tuple with an attribute value matching the regular expression Regexp. -n searches for any tuple containing the number Numeric. -sr and -nr are string and numeric range searches respectively. -r, -n, -sr, and -nr do not require the SearchString1 argument, and may replace the SearchString1 argument for the -a and -o options. The options may be added in any order or combination, but the ordering of the options in the command line determines the order in which the operations are performed. The following are examples of legal qedit command lines:

qedit e PersonalDB -r `(.*)[Rr]osh(.*)' qedit l PersonalDB rosh
qedit l PersonalDB sharon -a rosh qedit l PersonalDB -r `[Gg]il(.*)' -a benson

Qddb treats all keys as lower case; thus, the regular expression `[Rr]' is the same as `r'. The first example will find all occurances of the word rosh including those embedded in other words. The second example will only find those tuples with the white space or punctuation separated word `rosh'. The next example finds the tuples with both words finds all tuples with the word `benson' and a word that matches the given regular expression.

Multiple command line options (i.e. -r joe -r henry) give the union of the query results as the default. There is currently no way to tell Qedit that you want other binary operations on multiple options (except of course for the simple query using -a).

The EDITOR environment variable determines the editor used to edit each tuple. /usr/bin/vi is the default editor if the EDITOR variable is not initialized.

Tuples that are modified and saved in the editor are added to the Changes directory. Unmodified entries remain in the stable database only.


qs(1), query(1)


Qedit was designed as an example of how to write query programs with Qddb. It has many shortcomings and does not attempt to give the user access to the full querying capabilities of Qddb.


Each tuple is edited with a separate invocation of the editor. This prevents the overhead of determining which tuples were actually modified, but adds the overhead of the invocations.


A Guide to QDDB
Eric H. Herrin II and Raphael A. Finkel

Qddb User's Guide

An ASCII Database for Fast Queries of Relatively Stable Data Eric H. Herrin II and Raphael A. Finkel Computing Systems, Volume 4 Number 2
University of California Press, Berkeley CA

Schema and Tuple Trees: An Intuitive Structure for Representing Relational Data
Eric H. Herrin, II and Raphael A. Finkel Computing Systems, Volume 9, Number 2
MIT Press, Cambridge MA

Table of Contents