home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / sql / sqldmlrd.me < prev    next >
Encoding:
Text File  |  1988-05-03  |  3.0 KB  |  62 lines

  1. This directory contains a program illustrating the use of the SQL SELECT,
  2. UPDATE, DELETE, and INSERT functions in Ada.  A prototype database management
  3. system (PDBMS) loads a database descriptor (data dictionary) and database
  4. contents, then processes the data structures built by the Ada/SQL functions
  5. to actually perform DML operations.
  6.  
  7. Input file: DATE.DAT - description and contents of a database taken from Chris
  8.   Date's book Database: A Primer.
  9.  
  10. Output file: DML.OUT - script of screen output when the program was run using
  11.   the Data General (Rolm) validated Ada compiler.  Shows (1) results of DML
  12.   operations that have been implemented in the PDBMS and (2) pretty print of
  13.   sample complex queries that can be built using Ada/SQL data structures, but
  14.   for which functionality has not yet been implemented in the PDBMS.
  15.  
  16. Notes on the main program: CREATE_LINE and SET_LINE manage the output file.
  17.   LOAD_DATABASE causes the PDBMS to read a database descriptor and contents
  18.   file.  SET_DATABASE causes that database to be used for subsequent Ada/SQL
  19.   operations.  EXECUTE causes the PDBMS to perform the Ada/SQL operation
  20.   indicated by its parameter.  For retrievals, successive records are
  21.   retrieved using NEXT_RECORD, and FETCH is used to retrieve individual field
  22.   values within a record.  SHOW pretty prints, in SQL notation, the Ada/SQL
  23.   operation indicated by its parameter.  Note that queries can be built and
  24.   SHOWn for the full range of SQL, indicating that Ada/SQL functions and data
  25.   structures can successfully implement all of SQL.  Not all queries can
  26.   currently be executed by the PDBMS, however, as full SQL functionality has
  27.   not yet been implemented for it.
  28.  
  29. The combined source code is contained in DML.SRC and the compilationorder
  30. is shown in DML.DIS as well as below:
  31.  
  32. Filename  Package name       Description
  33. --------  ------------       -----------
  34. TXTPRT    TEXT_PRINT         Manage output file, including continuation lines
  35.                              Also provide minimum width and default format
  36.                                printing of numbers
  37.                              Same as TEXT_PRINT for DDL, except without
  38.                                phantoms
  39.  
  40. TXTINP    TEXT_INPUT         Manage input file, simplify reading input as
  41.                                tokens
  42.  
  43. SQLDEF    SQL_DEFINITIONS    Defines data structures, generic and other
  44.                                functions
  45.  
  46. SQLOPS    SQL_OPERATIONS     Defines all Ada/SQL operations
  47.  
  48. DATEUND   DATE_UNDERLYING    Defines (mostly) data structures for Date's
  49.                                database
  50.  
  51. DATEDB    DATE_DATABASE      Defines functions used to access Date's database
  52.  
  53. PGMFUNC   PROGRAM_FUNCTIONS  Execution of data manipulation operations
  54.  
  55. BULKFUNC  BULK_FUNCTIONS     Database load and save
  56.  
  57. SHOW      SHOW_PACKAGE       Pretty print formatted SQL from Ada/SQL data
  58.                                structures
  59.  
  60. MAIN      MAIN               Main program, contains examples of Ada/SQL DML
  61.     
  62.