Qddb is an acronym for ``Quick and Dirty DataBase,'' largely due to its origin. Qddb was originally to be a quickly implemented efficient database tool. Our initial success led to layers of new function and reworked data structures; it is still efficient, but we can no longer claim that it was quickly implemented.
Qddb provides a simple yet intuitive means of storing and accessing data. Data are stored in relations; each relation follows a format described by a schema. For example, a database of friends' telephone numbers might be stored in a single relation. Data within a relation are organized into tuples. Continuing the example, each friend would be associated with a different tuple. Within each tuple, data are stored as values of attributes. There might be, for example, an attribute for the friend's name and another for the telephone number. The value of an attribute may be arbitrary Ascii data (any character is valid in someone's name) and may have arbitrary length (names may be arbitrarily long). An attribute may be expandable, that is, may have an arbitrary number of occurrences (called instances), each with its own value. For example, a single friend may have several phone numbers, each represented as a different instance of the same attribute. Finally, attributes may be structured to contain subattributes. For example, phone numbers may be subdivided into country code, area code, and local phone number.
The file structures used by Qddb are intended for relatively stable data, where for the most part, data don't change after they are entered. Searches are very fast within the stable region of data, because the file structures (principally, hash tables) allow for fast access. Tuples that have been modified or added since the last stabilization are equally accessible, but searching them is significantly slower. Many databases fit this model; stabilization becomes necessary only when searches are too slow. For example, a nightly stabilization may be appropriate for on-line data acquisition, but monthly stabilization is likely to be adequate for a personal database of friends' phone numbers.
Qddb is an alternative to pure relational databases. It promotes a style in which individual tuples store large amounts of related information. For example, a record might be a software customer along with all its bug reports and purchases. When you access the customer's record, you would like to get all the related information, not just pieces of it. You would like to be able to browse through the information and extract certain parts. You would like to generate a list of all the tuples in which you have entered a comment on the customer's temperament. You might want to generate reports based on values, ranges of values, or regular expressions in certain attributes. Of course, you don't want to spend a week or more designing the relational tables and you certainly don't want to spend a fortune for the software.
Qddb is able to help you build such databases. After reading Chapter 2, you should be able to build a simple relation that meets your needs in about five minutes. You will automatically get tools customized to that relation that allow the sort of searches mentioned above. If you require something more specialized, Chapter 8 describes how to design custom applications.