Subroutines:

 

Form (One for each DB Table)

Input:      A global CGI variable named query
Output:   Either a submit or update form with the defaults specified in the CGI variable.
Purpose: To create a form with default values

Parser (One for all the Tables)

Input:      The global CGI variable query
Output:   A hash sent to the appropriate PERL module
Purpose: To validate the data and then send it to the perl modules to be entered or updated.

Viewer (One for all the Tables)

Input:      None
Output:   A button menu of all database table entries and the CGI variable query
Purpose: To allow the user to select a specific data set to update or delete

Setup (One for all DB tables and an extra one for Procpar)

Input:      The CGI variable query
Output:   None
Purpose: Extract the values of a specific data set and parse them into the CGI variable.  Then it sets a flag to call the appropriate form subroutine.

Delete (Combined with Setup subroutine)

Input:      The primary key
Output:   None
Purpose: To allow the user to delete invalid or useless data

PERL modules (One for each of the DB Tables)

Input:     An object
Output:   An SQL query to the DBI, Pg.pm
Purpose: To convert the form entries to SQL and send them to Pg.pm

Pg.pm

Input:      An SQL query
Output:   A command to the database
Purpose: To provide a PERL interface into the database