Content-type: text/html; charset=UTF-8 Man page of qprschema

qprschema

Section: Herrin Software Development, Inc. (1)
Updated: 21 Oct 2000
Index Return to Main Contents
 

NAME

qprschema - Print a QDDB Schema in TCL list format.  

SYNOPSIS

qprschema RelationDirectory
 

DESCRIPTION

qprschema prints the QDDB Schema in RelationDirectory in the form of a TCL list. For a given QDDB Schema, say:

    Use Cached Hashing
    HashSize = 1000

    Authors verbosename "Book Author" *
    Title verbosename "The Title"
    ISBN verbosename "ISBN Number"
    Description verbosename "Abstract or Review"

qprschema prints the schema in the following form:

    { Authors { "Book Author" yes } {} }
    { Title { "The Title" no } {} }
    { ISBN { "ISBN Number" no } {} }
    { Description { "Abstract or Review" no } {} }

The output is a set of TCL lists, each containing three elements: (1) the attribute name, (2) verbosename and expandable (yes if expandable, no otherwise), and (3) any subattributes. Subattributes may be nested. In our example above, there are no subattributes since the Schema is flat. In this case, the subattribute lists are empty.

A more complex example of a Schema might be:

    Use Cached Hashing
    HashSize = 1000

    Family verbosename "Family Members" (
        Name (Title First Middle Last) *
        Occupation *
    ) *
    Address (
        Street *
        City
        State
        Zip verbosename "Zip Code"
    ) *
    Phone (
        Area verbosename "Area Code"
        Number verbosename ""
    ) *
    Comments             

For this more complex example, qprschema prints the following TCL list:

    { Family { "Family Members" yes } {
        { Name { "" yes } {
            { Title { "" no } {} }
            { First { "" no } {} }
            { Middle { "" no } {} }
            { Last { "" no } {} }
        }}
        { Occupation { "" yes } {} }
    }}
    { Address { "" yes } {
        { Street { "" yes } {} }
        { City { "" no } {} }
        { State { "" no } {} }
        { Zip { "Zip Code" no } {} }
    }}
    { Phone { "" yes } {
        { Area { "Area Code" no } {} }
        { Number { "" no } {} }
    }}
    { Comments { "" no } {} }

Each TCL list can be traversed recursively to build a standard interface and/or provide options for any particular attribute (expandable (*) and verbosename). The TCL script nxqddb(1) is a good example of a generic interface that uses qprschema to determine the structure of the data and options for each attribute.  

SEE ALSO

qadd(1), qchange(1), qread(1), query(1)  

BUGS

None known.  

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


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
BUGS
REFERENCES

This document was created by man2html, using the manual pages.
Time: 18:55:30 GMT, October 31, 2018