Progress Programming Tips

By Rod Gaither (rdg@worldinfo.com)


PPT-13  Creating your own dictionary report

Tip:

As part of the relational model the database design information
is stored in tables within the database as well.  These tables,
often referred to as the "Meta" tables or Schema are available
to you just as your own application tables are.  One use you
can put this knowledge to is to write your own custom
dictionary report.  I would include my utility code as a sample
but after looking it over I wouldn't want anyone to write code
like that!  :-)

What you need to know to write your own is the following.

1.  FOR EACH _file WHERE NOT _file._file-name BEGINS "_":

One record per table, contains the name and description...
The check for the "_" in table names avoids schema tables.

2.  FOR EACH _field of _file BY _order:

3.  FOR EACH _index of _file:

4.  FOR EACH _index-field of _index:

Relates which fields are used in that index.

5.  FOR EACH _field of _index-field:

Back to fields for the field names in indexes.

Wisdom:

Every application has some system dependencies.  Since they
usually can't be avoided be sure to isolate them from other parts of
the application so they can be maintained separate from the
application logic.


Rod Gaither                  | rdg@worldinfo.com
World Information Systems    | (910) 333-2580  Voice
Greensboro, NC               | (910) 333-2584  Fax