
1. What is Qddb?

Qddb is a data manipulation suite that allows you to add, modify, and 
delete records.   Records may contain any ASCII characters and you can
search on any fields or across fields with:
    * word ranges 
    * numeric ranges
    * date ranges
    * words 
    * numbers 
    * dates
    * regular expressions
You can also combine searches with intersection, union and binary exclusion.
The results of a search can be displayed in a very flexible way.
See the nxqddb(1) manual page and ``A Guide to Qddb'' for more details.

2. Where can I get it?

The latest GNU version of Qddb can always be obtained from

    ftp.hsdi.com:/pub/qddb/sources/qddb-<version>.tar.gz

The Qddb home page is:

    http://www.hsdi.com/qddb

The latest commercial binary version of Qddb can be found at:

    http://www.hsdi.com/qddb/binaries


3. What can I do with it?

Anything you like.   Some examples are: business records, student records,
source tree management/compilation, bibliographical databases, and genealogical
databases.   It is pretty flexible since the base API is a Tcl extension.   
You can manipulate records from Tcl, translate them into any format you like, 
use extensions such as BLT to produce graphs and charts on the data.  We have 
also built several client/server applications using the tclTCP extension.
Of course, nxqddb(1) will get you started very quickly.

4. How can I find out more?

First, you should grab the distribution and read the documentation.   If you 
find that you want to discuss Qddb with others, there is a mailing list 
available for your enjoyment.   To join/leave the mailing list, send an e-mail 
message with the Subject: of ``Subscribe'' or``Unsubscribe'' to:

            qddb-users-request@ms.uky.edu

After you have subscribed, you can send mail to:

            qddb-users@ms.uky.edu

and you will receive messages from others.  If you unsubscribe, be sure
to include the same e-mail address to which you are subscribed; we can't
translate e-mail addresses.

5. Do I *have* to have Tcl/Tk to use Qddb?

We highly recommend Tcl/Tk because of the nice generic interface we provide.
Without Tcl/Tk, you cannot design your own custom interfaces.   For those of 
you using an ASCII terminal, there is a user interface but it is somewhat 
crude in comparison to the Tcl/Tk interface.

6. I did a 'configure' and it didn't install the Tcl/Tk stuff.  What gives?

You *must* specify --with-tk to get the Tcl/Tk stuff, or --with-tcl to just
get the Tcl stuff.   If you compiled your libtk.a (Tk 3.6) with the Xpm 
extensions from TkPixmap, then you must also specify --with-xpm if you 
specify --with-tk.   Since we still have a lot of users that are perfectly 
happy without the Tcl/Tk interface, we must give the option not to install 
it.   To get the nifty new nxqddb(1) interface, you have to configure 
with (at a minimum):

    $ ./configure --with-tk --with-itcl

We recommend:

    $ ./configure --with-tk --with-itcl --with-blt

7. I compiled Qddb and it compiled perfectly without warnings.  But
   when I try to stabilize my database, it core dumps.  Why?   I'm
   running Solaris.

You might also notice that things like Tcl globbing don't work.   Do
an 'ar tv libtcl.a' and see if there exist 'getcwd.o' and/or 'opendir.o.'
If so, you'll need to remove them.   Chances are that you'll have many
more problems besides Qddb if you don't, so you'll probably want to
recompile Tcl and Tk too.   (This FAQ is only for Tk 3.6 as far as we
know.)

8. Regular expressions don't seem to work on my DEC Alpha running OSF/1.
   Help?

You probably used GCC to compile.  Don't.  Use the standard DEC C compiler.
See "A Guide to Qddb" available under Doc/Manual in your source directory
for details.   (This FAQ may be old now.)

9. I have a relation that gives the following message when I try to
   run nxqddb(1).   
       Error while reading Schema:
       Cannot open schema: HashTable is locked for writing
   Why doesn't it work?

If your relation is shared among several people, it may also be that 
one of them is actually running qstall(1) at the moment.

10. I'm running nxqddb over NFS and it won't let me modify my data!
    It keeps coming up in "Read-only Mode" instead of "Change Mode."

If you aren't running a lock daemon, then you need to configure
Qddb with --disable-record-locking.   This should only be done
if *nobody* on your system uses Qddb as a multi-user database.
If you disable record locking, you shouldn't even run multiple 
nxqddb(1) processes on the same relation.

11. I can't seem to change the --with-default-date-format without
    inserting '"'s into my date strings!

When configuring, you need to make sure that you specify:
        --with-default-date-format=%m/%d/%y
*without* double quotes.   For example, the following is wrong:
        --with-default-date-format="%m/%d/%y"

12. I configured Qddb with --with-xpm and it causes link errors.
    What did I do wrong?

--with-xpm requires the TkPixmap extensions to be compiled into
libtk.a.  Also, older versions of TkPixmap didn't have the 
Pinfo_Init or Uxpm_Init routines, so if you think you have TkPixmap
installed, you might just have an out-of-date version.   Either
install a newer version of TkPixmap (3.6j) or reconfigure Qddb
without --with-xpm.   Tk 4.0 doesn't need this extension, but if
you include Tk extensions (Tix, etc.) that need the Xpm library 
under Tk 4.0, you should use it.

13. I upgraded to the latest Qddb and now nxqddb(1) won't run.

You may need to remove the old binary directory tree (usually 
/usr/local/qddb/*) before installing the new version.   The
format of the directories changes drastically from time to time,
so you should usually do the following before upgrading:

    $ rm -rf /usr/local/qddb
    $ make install

Another common problem is using --with-itcl instead of --with-itcl2
for use with [incr Tcl] 2.0 or later.   The Fx source tree is  
different since [incr Tcl] 2.X is <b>not</b> backward compatible
with [incr Tcl] 1.5.

14. I'm having some locking problems.

If you are running Qddb under Solaris and NFS, you are probably
running into a bug in the lock daemon.    You can get around
it by rebooting the machine, or you can do something like the
following in the database directory:

	$ mv HashTable HashTable.old
	$ cp HashTable.old HashTable

15. I'm trying to compile under Linux, but I'm having a lot
    of problems.

Make sure that the static versions of your X libraries are
installed if you didn't build Tcl/Tk and friends for
shared libraries.    The linker may get confused otherwise.
This is especially true of older, a.out Linux versions.

16. I'm getting a lot of collisions in my hash table.

You can try out a new hash function by including the following
line in your Schema:
        HashType = 1
You can also design your own hash functions by modifying
Qddb_HashValue in Lib/LibQddb/Hash.c.   Remember to
restabilize your database after you change the HashType.

17. I get a "command not found" error message when running 
nxqddb(1).

The compilation probably failed for some reason.   Check
the output of the build.    This also applies to the
message "invalid command: itcl_class" and "invalid command:
class".

Another common problem is using --with-itcl instead of --with-itcl2
for use with [incr Tcl] 2.0 or later.   The Fx source tree is  
different since [incr Tcl] 2.X is <b>not</b> backward compatible
with [incr Tcl] 1.5.

