Content-type: text/html; charset=UTF-8
Man page of qddb_schema
qddb_schema
Section: Herrin Software Development, Inc. (1)
Updated: 21 Oct 2000
Index
Return to Main Contents
NAME
qddb_schema - open/close and view characteristics of a Qddb schema.
SYNOPSIS
qddb_schema open Relation
qddb_schema leaves <schema_desc> ?<attribute>?
qddb_schema option type|verbosename|alias|isexpandable|exclude|autoincrement \
<schema_desc> <attr name>
qddb_schema path <schema_desc>
qddb_schema print <schema_desc>
qddb_schema secondarycaching <schema_desc> on|off
qddb_schema datestyle <schema_desc> us|european
qddb_schema excludewords <schema_desc>
qddb_schema close <schema_desc>
DESCRIPTION
- qddb_schema open
-
returns a descriptor <schema_desc> referring to a Qddb schema.
This token may be used with other Qddb TCL commands.
It will search for the relation in the directories specified
by QDDBDIRS after looking in the current directory. QDDBDIRS is of the
same format as the PATH environment variable, for example,
/usr/local/qddb/databases:/u/eric/databases
is a valid path. A file with the name 'HashTable' is
required in the Relation directory (qnewdb(1) builds this
file).
- qddb_schema leaves
-
returns a list of all leaves in the Schema in the dot-separated
form required by all Qddb TCL commands. If the optional
?<attribute>? field is specified, then all leaves at or below
that point in the schema are returned. Using the following
schema:
Name (
First verbosename "Client's First Name" *
Middle *
Last verbosename "Client's Middle Name"
) *
Address
an example might be:
% set s [qddb_schema open MyRelation]
% qddb_schema leaves $s
Name.First
Name.Middle
Name.Last
Address
% qddb_schema leaves $s Name
Name.First
Name.Middle
Name.Last
% qddb_schema leaves $s Address
Address
- qddb_schema option
-
returns the value of the option specified for the
given schema attribute. The type option
requires a leaf attribute and will give an TCL error
otherwise. The possible type strings are
integer, real, date, and string.
If the type is unspecified in the Schema, it defaults to
string. The exclude option returns 1 or
0 depending on whether the exclude option is specified
for the given leaf attribute. The isexpandable and
autoincrement options return yes or no
depending on whether the given attribute is expandable
or autoincremented respectively.
The format option returns
the format string, and the separators option
returns the separators string for the given leaf attribute.
The other options will accept an attribute at any level.
- qddb_schema path
-
prints the full pathname of the Qddb schema from the directory
given on qddb_schema open. An absolute path is always
returned.
- qddb_schema print
-
prints the schema in a list format. For example, the schema
defined above will be printed as:
{ Name { "" yes } {
{ First { "Client's First Name" yes } {} }
{ Middle { "" yes } {} }
{ Last { "Client's Middle Name" no } {} }
}
This list may be traversed to build generic
interfaces, (see nxqddb(1)). Each list consists of (1) an
attribute name, (2)) a list of characteristics for that attribute,
and (3) a list containing any subattributes. (2)
consists of the verbosename (if any) and yes/no for whether
the attribute is expandable.
- qddb_schema secondarycaching
-
allows you to temporarily turn on or off secondary caching. This
option is primarily for temporarily turning off the
Use cached secondary search schema option which slows down the writing
of tuples significantly while maintaining search speed.
Temporarily disabling secondary caching allows you to make
mass additions or changes to an existing or new database (if
you plan to immediately stabilize afterward) without changing
the option in the schema. Please note that you should perform
any searching before disabling secondary caching, disable
the cache, make your modifications and write them to disk, then
immediately stabilize the database. This option is intended
to be used on idle databases only; use it only if you understand
what you are doing.
- qddb_schema datestyle
-
changes the default date style for input purposes. No in-memory
tuples are automatically converted, so this should be one of the first
commands in the script after qddb_schema open.
- qddb_schema excludewords
-
returns a list containing all words in the ExcludeWords file, or
the null string if the ExcludeWords schema option is off.
- qddb_schema close
-
closes the Qddb schema associated with <schema_desc>.
Other Qddb structures that require the closed schema
will not be deleted (keylists, etc.) and cannot
be used after the schema is closed.
Multiple schemas may be open simultaneously and the
same schema may be open more than once. Qddb does
not understand the relationship between two different
schema descriptors that are opened on the same relation.
SEE ALSO
qddb_instance(n), qddb_keylist(n), qddb_rows(n)
qddb_search(n), qddb_tuple(n), qddb_view(n)
REFERENCES
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
TCL and the TK Toolkit
John K. Ousterhout
Addison-Wesley, 1994
ISBN 0-201-63337-X
DIAGNOSTICS
qddb_schema
will report an error if it cannot find the Qddb schema
specified.
BUGS
None known.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- SEE ALSO
-
- REFERENCES
-
- DIAGNOSTICS
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 18:55:30 GMT, October 31, 2018