home *** CD-ROM | disk | FTP | other *** search
- This directory contains a program illustrating the use of the SQL SELECT,
- UPDATE, DELETE, and INSERT functions in Ada. A prototype database management
- system (PDBMS) loads a database descriptor (data dictionary) and database
- contents, then processes the data structures built by the Ada/SQL functions
- to actually perform DML operations.
-
- Input file: DATE.DAT - description and contents of a database taken from Chris
- Date's book Database: A Primer.
-
- Output file: DML.OUT - script of screen output when the program was run using
- the Data General (Rolm) validated Ada compiler. Shows (1) results of DML
- operations that have been implemented in the PDBMS and (2) pretty print of
- sample complex queries that can be built using Ada/SQL data structures, but
- for which functionality has not yet been implemented in the PDBMS.
-
- Notes on the main program: CREATE_LINE and SET_LINE manage the output file.
- LOAD_DATABASE causes the PDBMS to read a database descriptor and contents
- file. SET_DATABASE causes that database to be used for subsequent Ada/SQL
- operations. EXECUTE causes the PDBMS to perform the Ada/SQL operation
- indicated by its parameter. For retrievals, successive records are
- retrieved using NEXT_RECORD, and FETCH is used to retrieve individual field
- values within a record. SHOW pretty prints, in SQL notation, the Ada/SQL
- operation indicated by its parameter. Note that queries can be built and
- SHOWn for the full range of SQL, indicating that Ada/SQL functions and data
- structures can successfully implement all of SQL. Not all queries can
- currently be executed by the PDBMS, however, as full SQL functionality has
- not yet been implemented for it.
-
- The combined source code is contained in DML.SRC and the compilationorder
- is shown in DML.DIS as well as below:
-
- Filename Package name Description
- -------- ------------ -----------
- TXTPRT TEXT_PRINT Manage output file, including continuation lines
- Also provide minimum width and default format
- printing of numbers
- Same as TEXT_PRINT for DDL, except without
- phantoms
-
- TXTINP TEXT_INPUT Manage input file, simplify reading input as
- tokens
-
- SQLDEF SQL_DEFINITIONS Defines data structures, generic and other
- functions
-
- SQLOPS SQL_OPERATIONS Defines all Ada/SQL operations
-
- DATEUND DATE_UNDERLYING Defines (mostly) data structures for Date's
- database
-
- DATEDB DATE_DATABASE Defines functions used to access Date's database
-
- PGMFUNC PROGRAM_FUNCTIONS Execution of data manipulation operations
-
- BULKFUNC BULK_FUNCTIONS Database load and save
-
- SHOW SHOW_PACKAGE Pretty print formatted SQL from Ada/SQL data
- structures
-
- MAIN MAIN Main program, contains examples of Ada/SQL DML
-
-