home *** CD-ROM | disk | FTP | other *** search
/ Hackers Toolkit v2.0 / Hackers_Toolkit_v2.0.iso / HTML / archive / Unix / HOWTOs / POSTGRES < prev    next >
Text File  |  1999-11-04  |  242KB  |  7,327 lines

  1.   Database-SQL-RDBMS HOW-TO document for Linux (PostgreSQL
  2.   Object Relational Database System)
  3.   Al Dev (Alavoor Vasudevan)        aldev@hotmail.com
  4.   v8.0, 29 July 1998
  5.  
  6.   This document is a "practical guide" to very quickly setup a SQL
  7.   Database engine and front end tools on a Unix system. It also dis¡
  8.   cusses the International standard language ANSI/ISO SQL and reviews
  9.   about the merits/advantages of the SQL database engine developed by
  10.   the world-wide internet in an "open development" environment.  It is
  11.   about HOW-TO setup a next generation Object Relational SQL Database
  12.   "PostgreSQL" on Unix system which can be used as Application Database
  13.   Server or as Web Database Server. PostgreSQL implements subset of
  14.   International standard ISO and ANSI SQL 1998,92,89. This document also
  15.   gives information on the interface programs for the database like
  16.   Front End GUIs, RAD tools (Rapid Application Development), programming
  17.   languages interfaces ("C", "C++", Java, Perl), ODBC, JDBC drivers and
  18.   Web Database Tools and Interface programs. Information given here
  19.   applies to all Unix platforms and other databases and will be very
  20.   useful for people who are new to Databases, SQL language and Post¡
  21.   greSQL.  This document also has SQL tutorial, SQL syntax which would
  22.   be very helpful for beginners. Experienced people will find this docu¡
  23.   ment useful as a handy reference guide. For students, the information
  24.   given here will enable them to get the source code for PostgreSQL
  25.   relational database system, from which they can learn how a RDBMS SQL
  26.   database engine is written.
  27.   ______________________________________________________________________
  28.  
  29.   Table of Contents
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.   1. Introduction
  68.  
  69.   2. Other Formats of this Document
  70.  
  71.   3. Laws of Physics applies to Software!
  72.  
  73.   4. What is PostgreSQL ?
  74.  
  75.   5. Where to get it ?
  76.  
  77.   6. PostgreSQL Supports Extremely Large Databases greater than 200 Gig
  78.  
  79.   7. How can I trust PostgreSQL ? Regression Test Package builds customer confidence
  80.  
  81.   8. GUI FrontEnd Tool for PostgreSQL (Graphical User Interface)
  82.  
  83.   9. Integrated Development Environment Tools for PostgreSQL (GUI IDE)
  84.  
  85.   10. Interface Drivers for PostgreSQL
  86.  
  87.      10.1 ODBC Drivers for PostgreSQL
  88.      10.2 UDBC Drivers for PostgreSQL
  89.      10.3 JDBC Drivers for PostgreSQL
  90.      10.4 Java for PostgreSQL
  91.  
  92.   11. Perl Database Interface (DBI) Driver for PostgreSQL
  93.  
  94.      11.1 Perl 5 interface for PostgreSQL
  95.      11.2 Perl Database Interface DBI
  96.         11.2.1 WHAT IS DBI ?
  97.         11.2.2 DBI driver for PostgreSQL DBD-Pg-0.63
  98.         11.2.3 Technical support for DBI
  99.         11.2.4 What is DBI, DBperl, Oraperl and *perl?
  100.         11.2.5 DBI specifications
  101.         11.2.6 Compilation problems or "It fails the test"
  102.         11.2.7 Is DBI supported under Windows 95 / NT platforms?
  103.         11.2.8 What's DBM? And why use DBI instead ?
  104.         11.2.9 Is < insert feature here > supported in DBI?
  105.         11.2.10 Is DBI any use for CGI programming?
  106.         11.2.11 How do I get faster connection times with DBD Oracle and CGI?
  107.         11.2.12 How do I get persistent connections with DBI and CGI?
  108.         11.2.13 ``When I run a perl script from the command line, it works, but, when I run it under the httpd, it fails!'' Why?
  109.         11.2.14 Can I do multi-threading with DBI?
  110.         11.2.15 How can I invoke stored procedures with DBI?
  111.         11.2.16 How can I get return values from stored procedures with DBI?
  112.         11.2.17 How can I create or drop a database with DBI?
  113.         11.2.18 How are NULL values handled by DBI?
  114.         11.2.19 What are these func methods all about?
  115.         11.2.20 Commercial Support and Training
  116.  
  117.   12. PostgreSQL Management Tools
  118.  
  119.      12.1 PGACCESS - A GUI Tool for PostgreSQL Management
  120.      12.2 Windows Interactive Query Tool for PostgreSQL (WISQL or MPSQL)
  121.      12.3 Interactive Query Tool (ISQL) for PostgreSQL called PSQL
  122.      12.4 MPMGR - A Database Management Tool for PostgresSQL
  123.  
  124.   13. Setting up multi-boxes PostgreSQL with just one monitor
  125.  
  126.   14. Applications and Tools for PostgreSQL
  127.  
  128.      14.1 PostgreSQL 4GL for web database applications - AppGEN Development System
  129.      14.2 WWW Web interface for PostgresSQL - DBENGINE
  130.      14.3 Apache Webserver Module for PostgreSQL - NeoSoft NeoWebScript
  131.      14.4 HEITML server side extension of HTML and a 4GL language for PostgreSQL
  132.      14.5 America On-line AOL Web server for PostgreSQL
  133.      14.6 Problem/Project Tracking System Application Tool for PostgreSQL
  134.      14.7 Convert dbase dbf files to PostgreSQL
  135.  
  136.   15. Web Database Design/Implementation tool for PostgreSQL - EARP
  137.  
  138.      15.1 What is EARP ?
  139.      15.2 Implementation
  140.      15.3 What you need to run EARP
  141.      15.4 How does it work ?
  142.      15.5 Where to get EARP ?
  143.  
  144.   16. PHP/FI Server-side html-embedded scripting language for PostgreSQL
  145.  
  146.      16.1 Major Features
  147.      16.2 Credits
  148.      16.3 PHP/FI Version 2.0 - Brief History
  149.      16.4 So, what can I do with PHP/FI ?
  150.      16.5 A simple example
  151.      16.6 CGI Redirection
  152.         16.6.1 Apache 1.0.x Notes
  153.         16.6.2 Netscape HTTPD
  154.         16.6.3 NCSA HTTPD
  155.      16.7 Running PHP/FI from the command line
  156.  
  157.   17. Python Interface for PostgreSQL
  158.  
  159.      17.1 Where to get PyGres ?
  160.      17.2 Information and support
  161.  
  162.   18. Gateway between PostgreSQL and the WWW - WDB-P95
  163.  
  164.      18.1 About wdb-p95
  165.      18.2 Does the PostgreSQL server, pgperl, and httpd have to be on the same host?
  166.  
  167.   19. "C", "C++", ESQL/C language Interfaces and Bitwise Operators for PostgreSQL
  168.  
  169.      19.1 "C" interface
  170.      19.2 "C++" interface
  171.      19.3 ESQL/C
  172.      19.4 BitWise Operators for PostgreSQL
  173.  
  174.   20. Japanese Kanji Code for PostgreSQL
  175.  
  176.   21. PostgreSQL Port to Windows 95/Windows NT
  177.  
  178.   22. Mailing Lists and Newsgroups
  179.  
  180.      22.1 Newsgroups
  181.      22.2 Get a Free e-mail account
  182.      22.3 English Mailing List
  183.      22.4 Archive of Mailing List
  184.      22.5 Spanish Mailing List
  185.  
  186.   23. Documentation and Reference Books
  187.  
  188.      23.1 User Guides and Manuals
  189.      23.2 Online Documentation
  190.      23.3 Useful Reference Textbooks
  191.      23.4 ANSI/ISO SQL Specifications documents  - SQL 1992, SQL 1998
  192.      23.5 Syntax of ANSI/ISO SQL 1992
  193.      23.6 Syntax of ANSI/ISO SQL 1998
  194.      23.7 SQL Tutorial for beginners
  195.      23.8 Temporal Extension to SQL92
  196.      23.9 Part 0 - Acquiring ISO/ANSI SQL Documents
  197.      23.10 Part 1 - ISO/ANSI SQL Current Status
  198.      23.11 Part 2 - ISO/ANSI SQL Foundation
  199.      23.12 Part 3 - ISO/ANSI SQL Call Level Interface
  200.      23.13 Part 4 - ISO/ANSI SQL Persistent Stored Modules
  201.      23.14 Part 5 - ISO/ANSI SQL/Bindings
  202.      23.15 Part 6 - ISO/ANSI SQL XA Interface Specialization (SQL/XA)
  203.      23.16 Part 7 - ISO/ANSI SQL Temporal
  204.         23.16.1 INTRODUCTION
  205.         23.16.2 A CASE STUDY - STORING CURRENT INFORMATION
  206.         23.16.3 A CASE STUDY - STORING HISTORY INFORMATION
  207.         23.16.4 A CASE STUDY - PROJECTION
  208.         23.16.5 A CASE STUDY - JOIN
  209.         23.16.6 A CASE STUDY - AGGREGATES
  210.         23.16.7 SUMMARY
  211.      23.17 Part 8 - ISO/ANSI SQL MULTIMEDIA (SQL/MM)
  212.  
  213.   24. Technical support for PostgreSQL
  214.  
  215.   25. Economic and Business Aspects
  216.  
  217.   26. List of Other Databases
  218.  
  219.   27. Internet World Wide Web Searching Tips
  220.  
  221.   28. Conclusion
  222.  
  223.   29. FAQ - Questions on PostgreSQL
  224.  
  225.   30. Copyright Notice
  226.  
  227.   31. Appendix A - Syntax of ANSI/ISO SQL 1992
  228.  
  229.   32. Appendix B - SQL Tutorial for beginners
  230.  
  231.      32.1 Tutorial for PostgreSQL
  232.      32.2 Internet URL pointers
  233.  
  234.  
  235.   ______________________________________________________________________
  236.  
  237.   1.  Introduction
  238.  
  239.   The purpose of this document is to provide comprehensive list of
  240.   pointers/URLs to quickly setup PostgreSQL and also to advocate the
  241.   benefits of Open Source Code system like PostgreSQL.
  242.  
  243.   Each and every computer system in the world needs a database to
  244.   store/retrieve the information.  The primary reason you use the
  245.   computer is to store, retrieve and process information and do all
  246.   these very quickly, thereby saving you time.  At the same time the
  247.   system must be simple, robust, fast, reliable, economical and very
  248.   easy to use.  Database is the most VITAL SYSTEM as it stores mission
  249.   critical information of every company in this world.  The most popular
  250.   database systems are based on the International Standard Organisation
  251.   (ISO) SQL specifications which are also based on ANSI SQL (American)
  252.   standards.  Current specifications generally used are ANSI SQL 92 and
  253.   ANSI SQL 89.  Upcoming standard is the SQL 1998/99 which is also
  254.   called SQL-3. Popular database like Oracle, Sybase and Informix
  255.   systems are based on these standards or are trying to implement these
  256.   standards.
  257.  
  258.   There are more than 20 varieties of commercial/internet database
  259.   systems which are being used in the world and many more will be coming
  260.   in the near future. Without a standard like ANSI/ISO SQL, it would be
  261.   very difficult for the customer to develop a application once and run
  262.   on all the database systems.  Today's customer wants to develop an
  263.   application once using ISO SQL, ODBC, JDBC and to be used on all
  264.   varieties of database systems in the world.
  265.   The world's most popular FREE Database which implements some of the
  266.   ISO SQL, ANSI SQL/98, SQL/92 and ANSI SQL/89 RDBMS is PostgreSQL.
  267.   PostgreSQL is next generation Object relational database and the
  268.   future ANSI SQL standards like SQL 1998 (SQL-3) and beyond will
  269.   increasingly deal with Object databases and Object data types.
  270.   PostgreSQL is the only free RDBMS in the world which supports Object
  271.   databases and SQL. This document will tell you how-to install the
  272.   database and also all the packages related to databases, how to set up
  273.   the Web database, application database, front end GUIs and interface
  274.   programs.  It is strongly advised that you MUST write your database
  275.   applications 100 % compliant to standards of ISO/ANSI SQL, ODBC, JDBC
  276.   so that your application is portable across multiple databases like
  277.   PostgreSQL, Oracle, Sybase, Informix etc.
  278.  
  279.   You get the highest quality, and lot many features with PostgreSQL as
  280.   it follows 'Open Source Code development model'. Open Source Code
  281.   model is the one where the complete source code is given to you and
  282.   the development takes place on the internet by a extremely vast
  283.   network of human brains.  Future trend foresees that most of the
  284.   software development will take place on the so called "Information
  285.   Super-Highway" which spans the whole globe.  In the coming years,
  286.   internet growth will be explosive which will further fuel rapid
  287.   adoption of PostgreSQL by customers.
  288.  
  289.   Applying the principles of statistics, mathematics and science to
  290.   software quality, you get the highest quality of software only in a
  291.   'Open Source Code System' like PostgreSQL by opening the source code
  292.   to a very vast number of human brains inter-connected by the
  293.   information super-highway.  Greater the number of human brains
  294.   working, the better will be the quality of software.  Open Source Code
  295.   model will also prevent RE-INVENTION OF WHEELS, eliminates DUPLICATION
  296.   OF WORK and will be very economical, saves time in distribution and
  297.   follows the modern economic laws of optimizing the national and global
  298.   resources.  Once a software work is done by others, than you DO NOT
  299.   need to re-do that again. You will not be wasting your valuable time
  300.   on something which had already been WELL DONE.  Your time is extremely
  301.   precious and it must be utilized efficiently, because you have only 8
  302.   hours per day for doing work!!  As we will be entering the 21st
  303.   century, there will be a change in the way that you get software for
  304.   your use.  Customers will give first preference for the open systems
  305.   software like PostgreSQL.
  306.  
  307.   Buying software may become a thing of the past. You only need to buy
  308.   good hardware, it is worth spending money on the hardware and get the
  309.   software from internet. Important point is that it is the computer
  310.   hardware which is doing bulk of the work.  Hardware is the real work
  311.   horse and software is just driving it.  Computer hardware is so much
  312.   more complex that only 6 out of 180 countries in the world so far have
  313.   demonstrated the capability of designing and manufacturing computer
  314.   chips/hardware.  Design and manufacturing of computer chips is a
  315.   advanced technology.  It is a very complex process, capital intensive,
  316.   requires large investments in plant and production machines which deal
  317.   with 0.18 micron technology. On a single small silicon chip millions
  318.   of transistors/circuits are densely packed.  Companies like Applied
  319.   Material, AMD, Intel, Cyrix, Hitachi, IBM and others spent significant
  320.   number of man-years to master the high-technology like Chip Design,
  321.   Micro-electronics and Nano-electronics.  Micro means (one-millionth of
  322.   meter 10^-6), Nano  means (one-billionth of meter 10^-9). Current
  323.   technology uses micro-electronics of about 0.35 micron using aluminum
  324.   as conductors, 0.25 micron sizes using copper as conductors of
  325.   electrons.  In near future the technology of 0.10 micron with copper
  326.   and even nano-electronics will be used to make computer chips.
  327.   Aluminum conductors will be phased out by copper on computer chips, as
  328.   copper is a better conductor of electrons.  In photolithography
  329.   process extreme ultraviolet, X-ray or electron-beam techniques will be
  330.   used to etch circuits for feature size less than 0.15 micron.  Table
  331.   below shows the progress and future advancement trends of computer
  332.   chips.
  333.  
  334.  
  335.                             Advancement of chip capabilities in future
  336.                            ********************************************
  337.        +--------------------------+---------+---------+---------+---------+--------+---------+
  338.        | Item/Year                | 1997    | 1999    | 2001    | 2003    | 2012   | 2020    |
  339.        +--------------------------+---------+---------+---------+---------+--------+---------+
  340.        | Feature size(micron)     | 0.25    | 0.18    | 0.15    | 0.13    | 0.05   | 0.005   |
  341.        +--------------------------+---------+---------+---------+---------+--------+---------+
  342.        | Wafer size(mm)           | 200     | 300     | 300     | 300     | 450    | 600     |
  343.        +--------------------------+---------+---------+---------+---------+--------+---------+
  344.        | Min Operating Voltage    | 1.8-2.5 | 1.5-1.8 | 1.2-1.5 | 1.2-1.5 | 0.5-0.6| 0.1-0.02|
  345.        +--------------------------+---------+---------+---------+---------+--------+---------+
  346.        | Max power dissipation    | 70      | 90      | 110     | 130     | 175    | 300     |
  347.        +--------------------------+---------+---------+---------+---------+--------+---------+
  348.        | On-chip frequencey (MHz) | 750     | 1,250   | 1,500   | 2,100   | 10,000 | 50,000  |
  349.        +--------------------------+---------+---------+---------+---------+--------+---------+
  350.        | DRAM capacity            | 256 MB  | 1 GB    | 2 GB    | 4 GB    | 256 GB | 1000GB  |
  351.        +--------------------------+---------+---------+---------+---------+--------+---------+
  352.  
  353.  
  354.  
  355.  
  356.   As you can see, it is hardware that is high technology and important
  357.   and software is a less difficult technology.  Hence, manufacturing
  358.   hardware/hard-goods is vital for national economy! Companies like Com¡
  359.   paq, Dell, Sun Microsystems, HP, IBM who manufacture computers are
  360.   major contributors to U.S economy today and in the future!!
  361.  
  362.   On other hand, each and every country in the world develops/makes
  363.   software.  In fact, any person in this world with a small low-cost PC
  364.   can create a Oracle database server system. But it would take him
  365.   about 10 years (Oracle database server is about 10 man-years of work).
  366.   One man-year is one person working full-time for one full year. If 10
  367.   people work for a year than it is 10 man-years spent.
  368.  
  369.   Databases like Oracle, Informix, Sybase, IBM DB2 (Unix) are written in
  370.   nothing but 100% "C" language and binaries are created by compiling
  371.   the source and than shipped out to customers.
  372.  
  373.  
  374.   Since a lot of work had been done on PostgreSQL for the past 12 years,
  375.   it does not make sense to re-create from scratch another database
  376.   which satisfies ANSI/ISO SQL.  It will be a great advantage to take
  377.   the existing code and add missing features or enhancements to
  378.   PostgreSQL and start using it immediately.
  379.  
  380.   PostgreSQL is not just a free database but it is a good quality
  381.   'Internet Product'.  Prediction is that demand for "Made By Internet"
  382.   products will grow exponentially as it is capable of maintaining a
  383.   high quality, low cost, extremely large user-base and developer-base.
  384.   Those nations who do not use the 'Made By Internet' products will be
  385.   seriously missing "World-wide Internet Revolution" and will be left
  386.   far behind other countries. The reason is "Internet" itself is the
  387.   world's LARGEST software company!
  388.  
  389.   2.  Other Formats of this Document
  390.  
  391.   This document is published in 10 different formats namely - DVI,
  392.   Postscript, Latex, LyX, GNU-info, HTML, RTF(Rich Text Format), Plain-
  393.   text, Unix man pages and SGML.
  394.  
  395.   ╖  You can get this HOWTO document as a single file tar ball in HTML,
  396.      DVI, Postscript or SGML formats from -
  397.      <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/>
  398.  
  399.   ╖  Plain text format is in:
  400.      <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO>
  401.  
  402.   ╖  Translations to other languages like French, German, Spanish,
  403.      Chinese, Japanese are in
  404.      <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO> Any help from you to
  405.      translate to other languages is welcome.
  406.  
  407.      The document is written using a tool called "SGML tool" which can
  408.      be got from - <http://www.xs4all.nl/~cg/sgmltools/> Compiling the
  409.      source you will get the following commands like
  410.  
  411.   ╖  sgml2html databasehowto.sgml     (to generate html file)
  412.  
  413.   ╖  sgml2rtf  databasehowto.sgml     (to generate RTF file)
  414.  
  415.   ╖  sgml2latex databasehowto.sgml    (to generate latex file)
  416.  
  417.   This document is located at -
  418.  
  419.   ╖  <http://sunsite.unc.edu/LDP/HOWTO/PostgreSQL-HOWTO.html>
  420.  
  421.   Also you can find this document at the following mirrors sites -
  422.  
  423.   ╖  <http://www.caldera.com/LDP/HOWTO/PostgreSQL-HOWTO.html>
  424.  
  425.   ╖  <http://www.WGS.com/LDP/HOWTO/PostgreSQL-HOWTO.html>
  426.  
  427.   ╖  <http://www.cc.gatech.edu/linux/LDP/HOWTO/PostgreSQL-HOWTO.html>
  428.  
  429.   ╖  <http://www.redhat.com/linux-info/ldp/HOWTO/PostgreSQL-HOWTO.html>
  430.  
  431.   ╖  Other mirror sites near you (network-address-wise) can be found at
  432.      <http://sunsite.unc.edu/LDP/hmirrors.html> select a site and go to
  433.      directory /LDP/HOWTO/PostgreSQL-HOWTO.html
  434.  
  435.  
  436.   In order to view the document in dvi format, use the xdvi program. The
  437.   xdvi program is located in tetex-xdvi*.rpm package in Redhat Linux
  438.   which can be located through ControlPanel | Applications | Publishing
  439.   | TeX menu buttons.
  440.  
  441.  
  442.                To read dvi document give the command -
  443.                        xdvi -geometry 80x90 howto.dvi
  444.                And resize the window with mouse. See man page on xdvi.
  445.                To navigate use Arrow keys, Page Up, Page Down keys, also
  446.                you can use 'f', 'd', 'u', 'c', 'l', 'r', 'p', 'n' letter
  447.                keys to move up, down, center, next page, previous page etc.
  448.                To turn off expert menu press 'x'.
  449.  
  450.  
  451.  
  452.  
  453.   You can read postscript file using the program 'gv' (ghostview) or The
  454.   ghostscript program is in ghostscript*.rpm package and gv program is
  455.   in gv*.rpm package in Redhat Linux which can be located through Con¡
  456.   trolPanel | Applications | Graphics menu buttons. The gv program is
  457.   much more user friendly than ghostscript.  Also ghostscript and gv are
  458.   available on other platforms like OS/2, Windows 95 and NT, you view
  459.   this document even on those platforms.
  460.  
  461.  
  462.  
  463.           To read postscript document give the command -
  464.                   gv howto.ps
  465.  
  466.           To use ghostscript give -
  467.                   ghostscript howto.ps
  468.  
  469.  
  470.  
  471.  
  472.   CAUTION: This document is large, total number of pages (postscript) if
  473.   printed will be approximately 113 pages.
  474.  
  475.   You can read HTML format document using Netscape Navigator, Microsoft
  476.   Internet explorer, Redhat Baron Web browser or any of the 10 other web
  477.   browsers.
  478.  
  479.   You can read the latex, LyX output using LyX a X-Windows front end to
  480.   latex.
  481.  
  482.   3.  Laws of Physics applies to Software!
  483.  
  484.   To develop a project like PostgreSQL requires resources like energy
  485.   and time, hence PostgreSQL is a product of energy and time.  Since
  486.   energy and time can only be explained by science, there is a direct
  487.   co-relation between physics and software projects like PostgreSQL.
  488.  
  489.   Laws of science (Physics) applies everywhere, all the time, to
  490.   anything that you do and even to software projects.  Physics is in
  491.   action even while you are talking (sound waves), walking (friction
  492.   between ground and your feet), reading a book or writing software.
  493.   Various branches of sciences like physics, chemistry etc all merge
  494.   into one grand region of Mathematics (which is also known as the Queen
  495.   of all Sciences).  And everything in this world has a deep root in
  496.   mathematics, including PostgreSQL.
  497.  
  498.   The software like PostgreSQL is existing today because of the energy
  499.   and time.  It is the energy which made this world, human brains and
  500.   many other things! And mass and energy are ONE and the SAME entity!
  501.  
  502.   Cells in the human brains consume energy while processing (creating
  503.   software), by converting the chemical energy from food into electrical
  504.   and heat energy.  Even while you are reading this paragraph, the cells
  505.   in your brain are burning out the fuel and using the energy. So STOP
  506.   READING NOW! Cells are consuming energy even though it is very minute
  507.   and small!  The energy activity of neurons (brain cells) can be
  508.   measured in the laboratory. For example, there are many instruments
  509.   like 'Lie Detectors' and other medical instruments which can measure
  510.   the energy activities of brain.  All of these implies that human brain
  511.   is a thermodynamic heat engine.  Because human brain is a
  512.   thermodynamic engine, the laws of thermodynamics applies to brain and
  513.   hence thermodynamics has indirect effects on software like PostgreSQL.
  514.  
  515.   As per science, it is impossible to build any system or theory
  516.   (including a database software system) which will be 100 % perfect and
  517.   bug free.  It is like chasing a mirage, we will NEVER reach the goal
  518.   of perfect system or theory.  Detailed mathematical
  519.   equations/discussions to prove that '100 percent perfect system or
  520.   theory' is impossible, is a advanced topic and is beyond the scope of
  521.   this document. And such a mathematical discussion deals with infinite
  522.   number of dimensions which are existing in nature. Unfortunately
  523.   humans can see or feel only 4 dimensions but mathematics can easily
  524.   see many other dimensions.  Other dimensions are 'infinitely smaller'
  525.   than the atoms and atoms themselves are very minute which human eyes
  526.   cannot see them!
  527.  
  528.  
  529.   There can be infinite number of colors, computer langauages, computer
  530.   chip designs and theories but there CANNOT be ONE SINGLE PERFECT
  531.   color, computer language, design or system!  What you can have is only
  532.   a  NEAR PERFECT color(wavelength), system, database, or theory!
  533.   Nature is like a Kaliedoscope.
  534.  
  535.   By combining the energies of millions of people around the world via
  536.   internet it is possible to achieve a NEAR PERFECT system (including a
  537.   database software system). Individually, the energy of each person
  538.   will be minute, but by networking a large number of people, the total
  539.   energy will be huge which can be focused on a project to generate a
  540.   perfect system.  Human beings are creatures of finite energy and
  541.   resources, frequently guilty of errors ranging from the trivial to the
  542.   profound. Because our propensity for error varies broadly with
  543.   particular skills, particular experience and the vagaries of the
  544.   moment, the discovery and elimination of software bugs produced by
  545.   ordinary human error can be greatly facilitated by bringing a great
  546.   many minds to bear on the problem. In addition, more individuals
  547.   represent extra person hours of code and its asocciated function.
  548.  
  549.   It is very clear that internet can network a vast number of people,
  550.   which implies internet has lot of energy and time which can produce
  551.   much higher quality software products in much shorter time as compared
  552.   to commercial companies. Even big companies like Microsoft, IBM cannot
  553.   overpower and overrule the laws of Physics but will eventually
  554.   SURRENDER UNTO laws of science!
  555.  
  556.   Today, there are too many SQL RDBMS databases in the world aiming at
  557.   only one specification ANSI/ISO SQL. Man must not waste his time
  558.   creating too many similar/identical software packages and there are
  559.   many other topics in science which need good attention.
  560.  
  561.   Conclusion is - because of laws of science, 'open source code' system
  562.   like PostgreSQL, Linux will be always much better than 'closed source
  563.   code' system and it is possible to prove this statement
  564.   scientifically.
  565.  
  566.   4.  What is PostgreSQL ?
  567.  
  568.   PostgreSQL Version 6.3.2 patch level 2 is a free database, complete
  569.   source code is given to you and is a Object-Relational Database System
  570.   near compliant (getting closer) with ANSI SQL1998,92,89 and runs on
  571.   diverse hardware platforms and Operating systems.
  572.  
  573.  
  574.                Sometimes emergency bug fix patches are released after the
  575.                GA release of PostgreSQL. You can apply these optional patches
  576.                depending upon the needs of your application. Follow these
  577.                steps to apply the patches -
  578.                Change directory to postgresql source directory
  579.                        cd /usr/src/postgresql6.3.1
  580.                        patch -p0 < patchfile
  581.                        make clean
  582.                        make
  583.                See also manual page do 'man patch'
  584.  
  585.  
  586.  
  587.  
  588.   The patch files are located in
  589.  
  590.   ╖  PostgreSQL patches :  <ftp://ftp.postgresql.org/pub/patches>
  591.  
  592.   The ultimate objective and the final goal of PostgreSQL is to become
  593.   100 % compliant to ANSI/ISO SQL and also to become the number ONE open
  594.   generic Database in the world. PostgreSQL will also guide, steer,
  595.   control, monitor and dictate the future of ANSI/ISO SQL.  That is, the
  596.   implementation and ideas first take place in PostgreSQL and than later
  597.   be incorporated into the ANSI/ISO SQL.
  598.  
  599.   Informix Universal server (released 1997) is based on earlier version
  600.   of PostgreSQL because Informix bought Illustra Inc. and integrated
  601.   with Informix. Illustra database was completely based on Postgres
  602.   (earlier version of PostgreSQL).
  603.  
  604.   PostgreSQL is an enhancement of the POSTGRES database management
  605.   system, a next-generation DBMS research prototype.  While PostgreSQL
  606.   retains the powerful data model and rich data types of POSTGRES, it
  607.   replaces the PostQuel query language with an extended subset of SQL.
  608.  
  609.   PostgreSQL development is being performed by a team of Internet
  610.   developers who all subscribe to the PostgreSQL development mailing
  611.   list. The current coordinator is Marc G. Fournier
  612.  
  613.   ╖  scrappy@postgreSQL.org
  614.  
  615.      This team is now responsible for all current and future development
  616.      of PostgreSQL.  Ofcourse, the database customer himself is the
  617.      developer of PostgreSQL!  The development load is distributed among
  618.      a very large number of database end-users on internet.
  619.  
  620.   The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen.  Many
  621.   others have contributed to the porting, testing, debugging and
  622.   enhancement of the code. The original Postgres code, from which
  623.   PostgreSQL is derived, was the effort of many graduate students,
  624.   undergraduate students, and staff programmers working under the
  625.   direction of Professor Michael Stonebraker at the University of
  626.   California, Berkeley.
  627.  
  628.   The original name of the software at Berkeley was Postgres. When SQL
  629.   functionality was added in 1995, its name was changed to Postgres95.
  630.   The name was changed at the end of 1996 to PostgreSQL.
  631.  
  632.   Millions of PostgreSQL is installed as Database servers, Web database
  633.   servers and Application data servers. It is much more advanced and is
  634.   a object oriented relational database (ORDBMS).
  635.  
  636.   PostgreSQL can store more data types than traditional datatypes like
  637.   integer, characters, etc. - you get to create user-defined types,
  638.   functions, inheritance etc.  PostgreSQL runs on Solaris, SunOS, HPUX,
  639.   AIX, Linux, Irix, Digital Unix, BSDi,NetBSD, FreeBSD, SCO unix,
  640.   NEXTSTEP, Unixware and all and every flavor of Unix. Port to Windows
  641.   95/NT is underway.
  642.  
  643.   ╖  Title:             PostgreSQL SQL RDBMS Database (Object Relational
  644.      Database Management System)
  645.  
  646.   ╖  Current Version:   6.3.1 patch level 1
  647.  
  648.   ╖  Age:               PostgreSQL is 12 years old. Developed since 1985
  649.  
  650.   ╖  Authors:           Developed by millions/universities/companies on
  651.      internet for the past 12 YEARS
  652.  
  653.      PostgreSQL and related items in this document are subject to the
  654.      following COPYRIGHT.
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.   PostgreSQL Data Base Management System
  662.  
  663.   Copyright (c) 1994-6 Regents of the University of California
  664.  
  665.   Permission to use, copy, modify, and distribute this software and its
  666.   documentation for any purpose, without fee, and without a written agreement
  667.   is hereby granted, provided that the above copyright notice and this
  668.   paragraph and the following two paragraphs appear in all copies.
  669.  
  670.   IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
  671.   DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
  672.   LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
  673.   DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
  674.   POSSIBILITY OF SUCH DAMAGE.
  675.  
  676.   THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  677.   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  678.   AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON
  679.   AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
  680.   PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  681.  
  682.  
  683.  
  684.  
  685.   5.  Where to get it ?
  686.  
  687.   You can buy Redhat Linux CDROM, Debian Linux CDROM or Slackware Linux
  688.   CDROM which already contains the Postgresql in package form (both
  689.   source code and binaries) from :
  690.  
  691.   ╖  Linux System Labs Web site:   <http://www.lsl.com/>  7 (U.S.
  692.      dollars)
  693.  
  694.   ╖  Cheap Bytes Inc Web site:   <http://www.cheapbytes.com/> 7 (U.S.
  695.      dollars)
  696.  
  697.   ╖  Debian Main Web site :  <http://www.debian.org/vendors.html>
  698.  
  699.   PostgreSQL organisation is also selling 'PostgreSQL CDROM' which
  700.   contains the complete source code and binaries for many Unix operating
  701.   systems as well as full documentation.
  702.  
  703.   ╖  PostgreSQL CDROM from main Web site at :
  704.      <http://www.postgresql.org> 29 (U.S. dollars)
  705.  
  706.   Binaries only distribution of PostgreSQL:
  707.  
  708.   ╖  You can run PostgreSQL without compiling the source. Get binaries
  709.      for Intel-Linux from  <ftp://www.redhat.com/pub/contrib/i386/> file
  710.      is postgresql-6.2-3.i386.rpm. This is in the redhat package 'rpm'
  711.      format and it contains both source and binaries for PostgreSQL.
  712.  
  713.   ╖  Binaries site for Solaris, HPUX, AIX, IRIX, Linux :
  714.      <ftp://ftp.postgresql.org/pub/bindist> If you compile on any
  715.      platform please upload to site, so that it will be useful for
  716.      others.
  717.  
  718.   ╖  ftp site : Get binaries for Intel-Linux from
  719.      <ftp://ftp.redhat.com/pub/contrib/i386/> file is
  720.      postgresql-6.2-3.i386.rpm. This is in the redhat package 'rpm'
  721.      format and it contains both source and binaries for PostgreSQL.
  722.  
  723.  
  724.   WWW Web sites:
  725.  
  726.  
  727.   ╖  Primary Web site:   <http://www.postgresql.org/>
  728.  
  729.   ╖  Secondary Web site:      <http://logical.thought.net/postgres95/>
  730.  
  731.   ╖  <http://www.itm.tu-clausthal.de/mirrors/postgres95/>
  732.  
  733.   ╖  <http://s2k-ftp.cs.berkeley.edu:8000/postgres95/>
  734.  
  735.   ╖  <http://xenium.pdi.net/PostgreSQL/>
  736.  
  737.   ╖  <http://s2k-ftp.cs.berkeley.edu:8000/postgres95/>
  738.  
  739.  
  740.   The ftp sites are listed below :-
  741.  
  742.   ╖  Primary FTP:        <ftp://ftp.postgresql.org/pub>
  743.  
  744.   ╖  Secondary FTP:      <ftp://ftp.chicks.net/pub/postgresql>
  745.  
  746.   ╖  <ftp://ftp.emsi.priv.at/pub/postgres/>
  747.  
  748.   ╖  <ftp://ftp.itm.tu-clausthal.de/pub/mirrors/postgres95>
  749.  
  750.   ╖  <ftp://rocker.sch.bme.hu/pub/mirrors/postgreSQL>
  751.  
  752.   ╖  <ftp://ftp.jaist.ac.jp/pub/dbms/postgres95>
  753.  
  754.   ╖  <ftp://ftp.luga.or.at/pub/postgres95>
  755.  
  756.   ╖  <ftp://postgres95.vnet.net:/pub/postgres95>
  757.  
  758.   ╖  <ftp://ftpza.co.za/mirrors/postgres>
  759.  
  760.   ╖  <ftp://sunsite.auc.dk/pub/databases/postgresql>
  761.  
  762.   ╖  <ftp://ftp.task.gda.pl/pub/software/postgresql>
  763.  
  764.   ╖  <ftp://xenium.pdi.net/pub/PostgreSQL>
  765.  
  766.  
  767.   PostgreSQL source code is also available at all the mirror sites of
  768.   sunsite unc (total of about 1000 sites around the globe). It is inside
  769.   the Red Hat Linux distribution in /pub/contrib/i386/postgresql.rpm
  770.   file.
  771.  
  772.   ╖  For list of mirror sites go to  <ftp://sunsite.unc.edu>
  773.  
  774.   6.  PostgreSQL Supports Extremely Large Databases greater than 200 Gig
  775.  
  776.   Performance of 32-bit cpu machines will rapidly decline when the
  777.   database size exceed 5 gig. You can run 30 gig database on 32-bit cpu
  778.   but performance will not be very effective. There is limitation
  779.   imposed on the amount of RAM (maximum of 2 gig only), limitation on
  780.   the file system sizes and also on the operating system.
  781.  
  782.   If you need to use extremely large databases (greater than 5
  783.   gigabytes), it is strongly advised that you use 64-bit machines like
  784.   Digital Alpha cpu, Sun Ultra-sparc 64-bit cpu, Silicon graphics 64-bit
  785.   cpu, upcoming Intel Merced IA-64 cpu, HPUX 64bit machines, IBM 64-bit
  786.   machines. Compile PostgreSQL under 64-bit cpu and it can support huge
  787.   databases and large queries. Performance of PostgreSQL for queries on
  788.   large tables and databases will be several times faster than
  789.   PostgreSQL on 32-bit cpu machines. Advantage of 64-bit machines are
  790.   that you get very large memory addressing space and the operating
  791.   system can support very large file-systems, provide better performance
  792.   with large databases, support much larger memory(RAM), have more
  793.   capabilities etc..
  794.  
  795.   7.  How can I trust PostgreSQL ? Regression Test Package builds cus¡
  796.   tomer confidence
  797.  
  798.   Regression test package (src/test/regress) is included in the
  799.   distribution and let your computer do the verification for standard
  800.   SQL operations as well as the extensibility capabilities of
  801.   PostgreSQL.  Advantage is that computer can rapidly run millions of
  802.   SQL tests in a very short time.  Computers can carry out software
  803.   regression tests millions or even billions of times faster than humans
  804.   can.  In near future the speed of computer will be several zillion
  805.   times faster than human brain!  Hence, it makes sense to use the power
  806.   of computer to validate the software instead of using the human brain
  807.   power.
  808.  
  809.   The test package already contains hundreds of SQL test programs.  You
  810.   can start the regression test and come back later to take a glance at
  811.   the output results and the verification is done.
  812.  
  813.   You can add more tests just in case you need to, and can upload to the
  814.   primary PostgreSQL web site if you feel that it will be useful to
  815.   others on internet.  Regression test package helps build customer
  816.   confidence and trust in PostgreSQL and facilitates rapid deployment of
  817.   PostgreSQL on production systems.
  818.  
  819.   Regression test package can be taken as a "VERY SOLID" technical
  820.   document mutually agreed upon between the developers and end-users.
  821.   PostgreSQL developers extensively use the regression test package
  822.   during development period and also before releasing the software to
  823.   public to ensure good quality.
  824.  
  825.   8.  GUI FrontEnd Tool for PostgreSQL (Graphical User Interface)
  826.  
  827.   PostgreSQL has Tcl/Tk interface library in the distribution called
  828.   'pgTcl'. Tcl/Tk is a Rapid Application Development tool and is a
  829.   scripting language.  You can develop once and run it everywhere on NT,
  830.   Win 95, Linux, OS/2 and all unixes.  Tcl stands for 'Tool Command
  831.   Language' and Tk is 'Tool Kit'. There is a IDE (integrated development
  832.   environment) for Tcl/Tk called SpecTcl. Check for this rpm package
  833.   under Redhat linux distribution or at the sunscript site given below.
  834.  
  835.   Perl is strongly recommended as a scripting language, since it is the
  836.   most widely used and very powerful and is available on every hardware
  837.   and OS platforms.  Perl-Tk or Perl-Qt or C++ QtEZ or C++ Lesstiff is
  838.   strongly recommended.  A combination of Perl, C and Tk will satisfy
  839.   the needs of most projects from viewpoint of time resources, speed of
  840.   executable and ease of programming. Note that Java programs run very
  841.   slow. Even C++ programs run slower than C programs. The C programs run
  842.   the fastest as compared to other languages.  Perl programs can be
  843.   converted to "C" program using Perl2C program and than compiled which
  844.   will be very fast.
  845.  
  846.   Perl is used for programming 90 % of internet scripts in the world.
  847.   So you will have only one language "Perl" for all your needs - in
  848.   applications as well as internet.  See Perl Database Interface of this
  849.   document at ``''
  850.  
  851.   You should ponder over the strong points of Perl vis-a-vis Tcl/Tk
  852.   before starting any project on Tcl.  Tcl/TK is usually shipped with
  853.   every linux cdrom. Also you can get it from these sites -
  854.  
  855.   ╖  Tcl/Tk  <http://www.scriptics.com>
  856.  
  857.   ╖  Object oriented extension of Tcl called INCR at
  858.      <http://www.tcltk.com>
  859.   ╖  Visual TCL site  <http://www.neuron.com>
  860.  
  861.   ╖  Visual TCL Redhat rpm at
  862.      <ftp://ftp.redhat.com/pub/contrib/i386/visualtcl*.rpm>
  863.  
  864.   ╖  <http://sunscript.sun.com/>
  865.  
  866.   ╖  <http://sunscript.sun.com/TclTkCore/>
  867.  
  868.   ╖  <ftp://ftp.sunlabs.com/pub/tcl/tcl8.0a2.tar.Z>
  869.  
  870.   ╖  Reference text book: Many textbooks on TCL/TK are available in the
  871.      market.
  872.  
  873.   9.  Integrated Development Environment Tools for PostgreSQL (GUI IDE)
  874.  
  875.   Check out the following development tools which you can use in
  876.   conjunction with ODBC/JDBC drivers. These are similar to Borland C++
  877.   Builder, Borland JBuilder.
  878.  
  879.   Vibe is a Java and C++ IDE (Integrated Development Environment) that
  880.   won Unix Review's IDE of the year.
  881.  
  882.   ╖  More information on Vibe at
  883.      <http://www.LinuxMall.com/products/00487.html>
  884.  
  885.   ╖   You can also use Borland C++ Builder, Delphi, Borland JBuilder,
  886.      PowerBuilder on Windows95 connecting to PostgreSQL on unix box
  887.      through ODBC/JDBC drivers.
  888.  
  889.   See also PERL Database Interface of this document at ``'' Perl and
  890.   C/C++ is strongly recommended as the choice of langauge for IDE.
  891.  
  892.   Free of cost IDE Tools -
  893.  
  894.   Check the CDROM of redhat linux distribution.
  895.  
  896.   ╖  Lesstiff Motif tool
  897.      <ftp://ftp.redhat.com/pub/contrib/i386/lesstiff*.rpm>
  898.  
  899.   ╖  FreeBuilder  <ftp://ftp.redhat.com/pub/contrib/i386/free*.rpm>
  900.  
  901.   ╖  SpecTCL  <ftp://ftp.redhat.com/pub/contrib/i386/spec*.rpm>
  902.  
  903.   ╖  JccWarrior  <ftp://ftp.redhat.com/pub/contrib/i386/jcc*.rpm>
  904.  
  905.   ╖  Kanchenjunga Java RAD Tool for PostgreSQL
  906.      <http://www.man.ac.uk/~whaley/kj/kanch.html>
  907.  
  908.   ╖  Applixware Tool  <http://www.redhat.com>
  909.  
  910.   ╖  XWPE X Windows Programming Environment
  911.      <http://www.rpi.edu/~payned/xwpe/>
  912.      <ftp://ftp.redhat.com/pub/contrib/i386/xwpe*.rpm>
  913.  
  914.   ╖  XWB X Windows Work Bench
  915.      <ftp://ftp.redhat.com/pub/contrib/i386/xwb*.rpm>
  916.  
  917.   ╖  NEdit  <ftp://ftp.redhat.com/pub/contrib/i386/nedit*.rpm>
  918.  
  919.   10.  Interface Drivers for PostgreSQL
  920.  
  921.  
  922.  
  923.  
  924.  
  925.   10.1.  ODBC Drivers for PostgreSQL
  926.  
  927.   ODBC stands for 'Open DataBase Connectivity' is a popular standard for
  928.   accessing information from various databases from different vendors.
  929.   Applications written using the ODBC drivers are guaranteed to work
  930.   with various databases like PostgreSQL, Oracle, Sybase, Informix etc..
  931.  
  932.  
  933.   ╖  PostODBC is already included in the distribution. See main web site
  934.      <http://www.postgresql.org>. It is included on the PostgreSQL
  935.      CDROM.
  936.  
  937.   ╖  <http://www.openlinksw.com> Open Link Software Corporation is
  938.      selling ODBC for PostgreSQL and other databases.  Open Link also is
  939.      giving away free ODBC (limited seats) check them out.
  940.  
  941.   ╖  Insight ODBC for PostgreSQL  <http://www.insightdist.com/psqlodbc>
  942.      This is the official PostODBC site.
  943.  
  944.   There is a project called the FreeODBC Pack Package . There's no
  945.   PostgreSQL Version there, maybe you can help.
  946.  
  947.   ╖  <http://www.ids.net/~bjepson/freeODBC/> This is a free of cost
  948.      version of ODBC.
  949.  
  950.   10.2.  UDBC Drivers for PostgreSQL
  951.  
  952.   UDBC is a static version of ODBC independent of driver managers and
  953.   DLL support, used to embed database connectivity support directly into
  954.   applications.
  955.  
  956.   ╖  <http://www.openlinksw.com> Open Link Software Corporation is
  957.      selling UDBC for PostgreSQL and other databases.  Open Link also is
  958.      giving away free UDBC (limited seats) check them out.
  959.  
  960.   10.3.  JDBC Drivers for PostgreSQL
  961.  
  962.   JDBC stands for 'Java DataBase Connectivity'. Java is a platform
  963.   independent programming language developed by Sun Microsystems. Java
  964.   programmers are encouraged to write database applications using the
  965.   JDBC to facilitate portability across databases like PostgreSQL,
  966.   Oracle, informix, etc. If you write Java applications you can get JDBC
  967.   drivers for PostgreSQL from the following sites:
  968.  
  969.   JDBC driver is already included in the PostgreSQL distribution.
  970.  
  971.  
  972.   ╖  <http://www.demon.co.uk/finder/postgres/index.html> Sun's Java
  973.      connectivity to PostgreSQL
  974.  
  975.   ╖  <ftp://ftp.ai.mit.edu/people/rst/rst-jdbc.tar.gz>
  976.  
  977.   ╖  <http://www.openlinksw.com> Open Link Software Corporation is
  978.      selling JDBC for PostgreSQL and other databases.  Open Link also is
  979.      giving away free JDBC (limited seats) check them out.
  980.  
  981.   ╖  JDBC UK site  <http://www.retep.org.uk/postgres>
  982.  
  983.   ╖  JDBC FAQ site  <http://eagle.eku.edu/tools/jdbc/faq.html>
  984.  
  985.   The JDBC home, guide and FAQ are located at -
  986.  
  987.   ╖  JDBC HOME  <http://splash.javasoft.com/jdbc>
  988.  
  989.   ╖  JDBC guide
  990.      <http://www.javasoft.com/products/jdk/1.1/docs/guide/jdbc>
  991.   ╖  JDBC FAQ  <http://javanese.yoyoweb.com/JDBC/FAQ.txt>
  992.  
  993.   10.4.  Java for PostgreSQL
  994.  
  995.   Java programmers can find these for PostgreSQL very useful.
  996.  
  997.   ╖  <ftp://ftp.redhat.com/pub/contrib/i386> and see postgresql-
  998.      jdbc-*.rpm
  999.  
  1000.   ╖  <http://www.blackdown.org>
  1001.  
  1002.   11.  Perl Database Interface (DBI) Driver for PostgreSQL
  1003.  
  1004.  
  1005.   11.1.  Perl 5 interface for PostgreSQL
  1006.  
  1007.   PERL is an acronym for 'Practical Extraction and Report Language'.
  1008.   Perl is available on each and every operating system and hardware
  1009.   platform in the world.  You can use Perl on Windows95/NT, all flavors
  1010.   of Unix (Solaris, HPUX, AIX, Linux, Irix, SCO etc..), mainframe MVS,
  1011.   desktop OS/2, OS/400, Amdahl UTS and many others.  Perl runs EVEN on
  1012.   many unpopular or generally-unknown operating systems and hardware!!
  1013.   So do not be surprised if you see perl running on a very rarely used
  1014.   operating system.  You can imagine the vast extent of the user base
  1015.   and developer base of Perl.
  1016.  
  1017.   Perl interface for PostgreSQL is included in the distribution of
  1018.   PostgreSQL. Check in src/pgsql_perl5 directory.
  1019.  
  1020.   ╖  Pgsql_perl5 contact Email: E.Mergl@bawue.de
  1021.  
  1022.   ╖  Another source from -
  1023.      <ftp://ftp.kciLink.com/pub/PostgresPerl-1.3.tar.gz>
  1024.  
  1025.   ╖  Perl Home page :  <http://www.perl.com/perl/index.html>
  1026.  
  1027.   ╖  Perl tutorial, look for Tutorial title at :
  1028.      <http://reference.perl.com/>
  1029.  
  1030.   ╖  Perl FAQ is at :
  1031.      <http://www.yahoo.com/Computers_and_Internet/Programming_Languages/Perl/>
  1032.  
  1033.   ╖  Perl GUI User Interfaces Perl-Qt rpm :
  1034.      <ftp://ftp.redhat.com/pub/contrib/i386> and look for
  1035.      PerlQt-1.06-1.i386.rpm
  1036.  
  1037.   ╖  Perl GUI User Interfaces Perl-Qt :
  1038.      <http://www.accessone.com/~jql/perlqt.html>
  1039.  
  1040.   ╖  Perl GUI User Interfaces Perl-XForms :
  1041.      <ftp://ftp.redhat.com/pub/contrib/i386> and look for
  1042.      Xforms4Perl-0.8.4-1.i386.rpm
  1043.  
  1044.   ╖  Perl GUI User Interfaces Perl-Tk :
  1045.      <ftp://ftp.redhat.com/pub/contrib/i386>
  1046.  
  1047.   ╖  Perl GUIkits :  <http://reference.perl.com/query.cgi?ui>
  1048.  
  1049.   ╖  Perl Database Interfaces :
  1050.      <http://reference.perl.com/query.cgi?database>
  1051.  
  1052.   ╖  Perl to "C" translator :  <http://www.perl.com/CPAN-
  1053.      local/modules/by-module/B/> and look for Compiler-a3.tar.gz
  1054.  
  1055.   ╖  Perl to Bourne shell translator :
  1056.      <http://www.perl.com/CPAN/authors/id/MERLYN/sh2perl-0.02.tar.gz>
  1057.   ╖  awk to perl a2p and sed to perl s2p is included with the PERl
  1058.      distribution.
  1059.  
  1060.   ╖  See also the newsgroups for PERL at comp.lang.perl.*
  1061.  
  1062.   11.2.  Perl Database Interface DBI
  1063.  
  1064.   11.2.1.  WHAT IS DBI ?
  1065.  
  1066.   The Perl Database Interface (DBI) is a database access Application
  1067.   Programming Interface (API) for the Perl Language. The Perl DBI API
  1068.   specification defines a set of functions, variables and conventions
  1069.   that provide a consistent database interface independent of the actual
  1070.   database being used.  The information for this DBI section is obtained
  1071.   from 'DBI FAQ' doc whose author is Alligator Descartes and reproduced
  1072.   here with his permission.
  1073.  
  1074.   ╖  Alligator Descartes Hermetica is at descarte@hermetica.com
  1075.  
  1076.   11.2.2.  DBI driver for PostgreSQL DBD-Pg-0.63
  1077.  
  1078.   Get DBD-Pg-0.63.tar.gz from below
  1079.  
  1080.   ╖  Comprehensive Perl Archive Network CPAN  <http://www.perl.com/CPAN>
  1081.  
  1082.   ╖  DBI drivers list and DBI module pages
  1083.      <http://www.hermetica.com/technologia/perl/DBI>
  1084.  
  1085.   ╖  DBI information is at  <http://www.fugue.com/dbi/>
  1086.  
  1087.   ╖  Primary ftp site  <ftp://ftp.demon.co.uk/pub/perl/db>
  1088.  
  1089.   ╖  Miscellaneous DBI link  <http://www-ccs.cs.umass.edu/db.html>
  1090.  
  1091.   ╖  Miscellaneous DBI link
  1092.      <http://www.odmg.org/odmg93/updates_dbarry.html>
  1093.  
  1094.   ╖  Miscellaneous DBI link  <http://www.jcc.com/sql_stnd.html>
  1095.  
  1096.   ╖  PostgreSQL database  <http://www.postgresql.org>
  1097.  
  1098.   REQUIREMENTS:
  1099.  
  1100.   ╖  - build, test and install Perl 5         (at least 5.002)
  1101.  
  1102.   ╖  - build, test and install the DBI module (at least 0.89)
  1103.  
  1104.   ╖  - build, test and install PostgreSQL     (at least 6.2)
  1105.  
  1106.   11.2.3.  Technical support for DBI
  1107.  
  1108.   Please send comments and bug-reports to
  1109.  
  1110.   ╖  E.Mergl@bawue.de
  1111.  
  1112.   ╖  David R. Noble drnoble@engsci.sandia.gov
  1113.  
  1114.   Please include the output of perl -v, and perl -V, the version of
  1115.   PostgreSQL, the version of DBD-Pg, and the version of DBI in your bug-
  1116.   report.
  1117.  
  1118.  
  1119.   11.2.4.  What is DBI, DBperl, Oraperl and *perl?
  1120.  
  1121.   To quote Tim Bunce, the architect and author of DBI:
  1122.  
  1123.   ``DBI is a database access Application Programming Interface (API) for
  1124.   the Perl Language. The DBI API Specification defines a set of
  1125.   functions, variables and conventions that provide a consistent
  1126.   database interface independent of the actual database being used.''
  1127.  
  1128.   In simple language, the DBI interface allows users to access multiple
  1129.   database types transparently. So, if you connecting to an Oracle,
  1130.   Informix, mSQL, Sybase or whatever database, you don't need to know
  1131.   the underlying mechanics of the 3GL layer. The API defined by DBI will
  1132.   work on all these database types.
  1133.  
  1134.   A similar benefit is gained by the ability to connect to two different
  1135.   databases of different vendor within the one perl script, ie, I want
  1136.   to read data from an Oracle database and insert it back into an
  1137.   Informix database all within one program. The DBI layer allows you to
  1138.   do this simply and powerfully.
  1139.  
  1140.   DBperl is the old name for the interface specification. It's usually
  1141.   now used to denote perl4 modules on database interfacing, such as,
  1142.   oraperl, isqlperl, ingperl and so on. These interfaces didn't have a
  1143.   standard API and are generally not supported.
  1144.  
  1145.   Here's a list of DBperl modules, their corresponding DBI counterparts
  1146.   and support information. DBI driver queries should be directed to the
  1147.   dbi-users mailing list.
  1148.  
  1149.  
  1150.            Module Name Database Required   Author          DBI
  1151.            ----------- -----------------   ------          ---
  1152.            Sybperl     Sybase              Michael Peppler DBD::Sybase
  1153.                                            <mpeppler@datamig.com>
  1154.                                            http://www.mbay.net/~mpeppler
  1155.            Oraperl     Oracle 6 & 7        Kevin Stock     DBD::Oracle
  1156.                                            <dbi-users@fugue.com>
  1157.            Ingperl     Ingres              Tim Bunce &     DBD::Ingres
  1158.                                            Ted Lemon
  1159.                                            <dbi-users@fugue.com>
  1160.            Interperl   Interbase           Buzz Moschetti  DBD::Interbase
  1161.                                            <buzz@bear.com>
  1162.            Uniperl     Unify 5.0           Rick Wargo      None
  1163.                                            <rickers@coe.drexel.edu>
  1164.            Pgperl      Postgres            Igor Metz       DBD::Pg
  1165.                                            <metz@iam.unibe.ch>
  1166.            Btreeperl   NDBM                John Conover    SDBM?
  1167.                                            <john@johncon.com>
  1168.            Ctreeperl   C-Tree              John Conover    None
  1169.                                            <john@johncon.com>
  1170.            Cisamperl   Informix C-ISAM     Mathias Koerber None
  1171.                                            <mathias@unicorn.swi.com.sg>
  1172.            Duaperl     X.500 Directory     Eric Douglas    None
  1173.                        User Agent
  1174.  
  1175.  
  1176.  
  1177.  
  1178.   However, some DBI modules have DBperl emulation layers, so, DBD::Ora¡
  1179.   cle comes with an Oraperl emulation layer, which allows you to run
  1180.   legacy oraperl scripts without modification. The emulation layer
  1181.   translates the oraperl API calls into DBI calls and executes them
  1182.   through the DBI switch.
  1183.  
  1184.   Here's a table of emulation layer information:
  1185.  
  1186.  
  1187.  
  1188.  
  1189.       Module                  Emulation Layer     Status
  1190.       ------          ---------------     ------
  1191.       DBD::Oracle     Oraperl             Complete
  1192.       DBD::Informix   Isqlperl            Under development
  1193.       DBD::Sybase     Sybperl             Working? ( Needs verification )
  1194.       DBD::mSQL       Msqlperl            Experimentally released with
  1195.                                           DBD::mSQL-0.61
  1196.  
  1197.  
  1198.  
  1199.  
  1200.   The Msqlperl emulation is a special case. Msqlperl is a perl5 driver
  1201.   for mSQL databases, but does not conform to the DBI Specification.
  1202.   It's use is being deprecated in favour of DBD::mSQL. Msqlperl may be
  1203.   downloaded from CPAN via:
  1204.  
  1205.   ╖  <http://www.perl.com/cgi-bin/cpan_mod?module=Msqlperl>
  1206.  
  1207.   11.2.5.  DBI specifications
  1208.  
  1209.   There are a few information sources on DBI.
  1210.  
  1211.   ╖  DBI Specification
  1212.      <http://www.hermetica.com/technologia/perl/DBI/doc/dbispec>
  1213.  
  1214.      There are two specifications available at this link, the new DBI
  1215.      Draft Specification which is a rapidly changing document as the
  1216.      development team drive towards a stable interface, and the old
  1217.      historical DBperl Specification out of which the current DBI
  1218.      interface evolved.
  1219.  
  1220.   The later document should be regarded as being of historical interest
  1221.   only and should not serve as a programming manual, or authoratative in
  1222.   any sense. However, it is still a very useful reference source.
  1223.  
  1224.   POD documentation PODs are chunks of documentation usually embedded
  1225.   within perl programs that document the code ``in place'', providing a
  1226.   useful resource for programmers and users of modules. POD for DBI and
  1227.   drivers is beginning to become more commonplace, and documentation for
  1228.   these modules can be read with the following commands.
  1229.  
  1230.   The DBI Specification The POD for the DBI Specification can be read
  1231.   with the command
  1232.  
  1233.   perldoc DBI
  1234.  
  1235.   Oraperl Users of the Oraperl emulation layer bundled with DBD::Oracle,
  1236.   may read up on how to program with the Oraperl interface by typing:
  1237.  
  1238.   perldoc Oraperl
  1239.  
  1240.   This will produce an updated copy of the original oraperl man page
  1241.   written by Kevin Stock for perl4. The oraperl API is fully listed and
  1242.   described there.
  1243.  
  1244.   DBD::mSQL Users of the DBD::mSQL module may read about some of the
  1245.   private functions and quirks of that driver by typing:
  1246.  
  1247.   perldoc DBD::mSQL
  1248.  
  1249.   Frequently Asked Questions The Frequently Asked Questions is also
  1250.   available as POD documentation. Read this by typing:
  1251.  
  1252.   perldoc DBI::FAQ
  1253.  
  1254.  
  1255.   This may be more convenient to people not permanently, or
  1256.   conveniently, connected to the Internet.
  1257.  
  1258.   POD in general Information on writing POD, and on the philosophy of
  1259.   POD in general, can be read by typing:
  1260.  
  1261.   perldoc perlpod
  1262.  
  1263.   Users with the Tk module installed may be interested to learn there is
  1264.   a Tk-based POD reader available called tkpod, which formats POD in a
  1265.   convenient and readable way.
  1266.  
  1267.   Rambles, Tidbits and Observations : There are a series of occasional
  1268.   rambles from various people on the DBI mailing lists.
  1269.  
  1270.   ╖  <http://www.hermetica.com/technologia/perl/DBI/tidbits>
  1271.  
  1272.  
  1273.   ``DBI -- The perl5 Database Interface'' This is an article written by
  1274.   Alligator Descartes and Tim Bunce on the structure of DBI. It was
  1275.   published in issue 5 of ``The Perl Journal''.  It's extremely good. Go
  1276.   buy the magazine. In fact, buy all of them.  ``The Perl Journal''s WWW
  1277.   site is:
  1278.  
  1279.   ╖  <http://www.tpj.com>
  1280.  
  1281.   ``DBperl'' This article, published in the November 1996 edition of
  1282.   ``Dr. Dobbs Journal'' concerned DBperl.
  1283.  
  1284.   ``The Perl5 Database Interface'' This item is a book to be written by
  1285.   Alligator Descartes and published by O'Reilly and Associates.
  1286.  
  1287.   Mailing Lists There are three mailing lists for DBI run by Ted Lemon.
  1288.   These can all be subscribed to and unsubscribed from via the World
  1289.   Wide Web at
  1290.  
  1291.   ╖  Mailing lists  <http://www.fugue.com/dbi>
  1292.  
  1293.   The lists that users may participate in are:
  1294.  
  1295.   dbi-announce This mailing list is for announcements only.  If you
  1296.   cannot successfully use the form on the above WWW page, please
  1297.   subscribe to the list in the following manner:
  1298.  
  1299.   ╖  Email: dbi-announce-request@fugue.com with a message body of
  1300.      'subscribe'
  1301.  
  1302.   dbi-dev This mailing list is intended for the use of developers
  1303.   discussing ideas and concepts for the DBI interface, API and driver
  1304.   mechanics. Only any use for developers, or interested parties.  If you
  1305.   cannot successfully use the form on the above WWW page, please
  1306.   subscribe to the list in the following manner:
  1307.  
  1308.   ╖  Email: dbi-dev-request@fugue.com with a message body of 'subscribe'
  1309.  
  1310.   dbi-users This mailing list is a general discussion list used for bug
  1311.   reporting, problem discussion and general enquiries.  If you cannot
  1312.   successfully use the form on the above WWW page, please subscribe to
  1313.   the list in the following manner:
  1314.  
  1315.   ╖  Email: dbi-users-request@fugue.com with a message body of
  1316.      'subscribe'
  1317.  
  1318.   Mailing List Archives
  1319.  
  1320.  
  1321.   ╖  US Mailing List Archives  <http://outside.organic.com/mail-
  1322.      archives/dbi-users/>
  1323.  
  1324.   ╖  European Mailing List Archives  <http://www.rosat.mpe-
  1325.      garching.mpg.de/mailing-lists/PerlDB-Interest>
  1326.  
  1327.   11.2.6.  Compilation problems or "It fails the test"
  1328.  
  1329.   If you have a core dump, try the Devel::CoreStack module for
  1330.   generating a stack trace from the core dump.  Devel::CoreStack can be
  1331.   found on CPAN at:
  1332.  
  1333.   ╖  <http://www.perl.com/cgi-bin/cpan_mod?module=Devel::CoreStack>
  1334.  
  1335.   Email the dbi-users Mailing List stack trace, module versions, perl
  1336.   version, test cases, operating system versions and any other pertinent
  1337.   information.  The more information you send, the quicker developers
  1338.   can track problems down. If you send us nothing, expect nothing back.
  1339.  
  1340.   11.2.7.  Is DBI supported under Windows 95 / NT platforms?
  1341.  
  1342.   The DBI and DBD::Oracle Win32 ports are now a standard part of DBI,
  1343.   so, downloading DBI of version higher than 0.81 should work fine.  You
  1344.   can access Microsoft Access and SQL-Server databases from DBI via
  1345.   ODBC.  Supplied with DBI-0.79 (and later) is an experimental DBI
  1346.   'emulation layer' for the Win32::ODBC module. It's called
  1347.   DBI::W32ODBC.  You will need the Win32::ODBC module.
  1348.  
  1349.   ╖  Win32 DBI    <http://www.hermetica.com/technologia/perl/DBI/win32>
  1350.  
  1351.   ╖  Win32 ODBC    <http://www.roth.net>
  1352.  
  1353.   11.2.8.  What's DBM? And why use DBI instead ?
  1354.  
  1355.   UNIX was originally blessed with simple file-based ``databases'',
  1356.   namely the dbm system. dbm lets you store data in files, and retrieve
  1357.   that data quickly. However, it also has serious drawbacks.
  1358.  
  1359.   File Locking
  1360.  
  1361.   The dbm systems did not allow particularly robust file locking
  1362.   capabilities, nor any capability for correcting problems arising
  1363.   through simultaneous writes [ to the database ].
  1364.  
  1365.   Arbitrary Data Structures
  1366.  
  1367.   The dbm systems only allows a single fixed data structure: key-value
  1368.   pairs. That value could be a complex object, such as a [ C ] struct,
  1369.   but the key had to be unique. This was a large limitation on the
  1370.   usefulness of dbm systems.
  1371.  
  1372.   However, dbm systems still provide a useful function for users with
  1373.   simple datasets and limited resources, since they are fast, robust and
  1374.   extremely well-tested. Perl modules to access dbm systems have now
  1375.   been integrated into the core Perl distribution via the AnyDBM_File
  1376.   module.
  1377.  
  1378.   To sum up, DBM is a perfectly satisfactory solution for essentially
  1379.   read-only databases, or small and simple datasets. However, for more
  1380.   powerful and scaleable datasets, not to mention robust transactional
  1381.   locking, users are recommended to use DBI.
  1382.  
  1383.   11.2.9.  Is < insert feature here > supported in DBI?
  1384.  
  1385.   Given that we're making the assumption that the feature you have
  1386.   requested is a non-standard database-specific feature, then the answer
  1387.   will be no.
  1388.  
  1389.   DBI reflects a generic API that will work for most databases, and has
  1390.   no database-specific functionality.
  1391.  
  1392.   However, driver authors may, if they so desire, include hooks to
  1393.   database-specific functionality through the func method defined in the
  1394.   DBI API. Script developers should note that use of functionality
  1395.   provided via the func methods is unlikely to be portable across
  1396.   databases.
  1397.  
  1398.   11.2.10.  Is DBI any use for CGI programming?
  1399.  
  1400.   In a word, yes! DBI is hugely useful for CGI programming! In fact, CGI
  1401.   programming is one of two top uses for DBI.
  1402.  
  1403.   DBI confers the ability to CGI programmers to power WWW-fronted
  1404.   databases to their users, which provides users with vast quantities of
  1405.   ordered data to play with. DBI also provides the possibility that, if
  1406.   a site is receiving far too much traffic than their database server
  1407.   can cope with, they can upgrade the database server behind the scenes
  1408.   with no alterations to the CGI scripts.
  1409.  
  1410.   11.2.11.  How do I get faster connection times with DBD Oracle and
  1411.   CGI?
  1412.  
  1413.   The Apache httpd maintains a pool of httpd children to service client
  1414.   requests.  Using the Apache mod_perl module by Doug MacEachern, the
  1415.   perl interpreter is embedded with the httpd children. The CGI, DBI,
  1416.   and your other favorite modules can be loaded at the startup of each
  1417.   child. These modules will not be reloaded unless changed on disk.  For
  1418.   more information on Apache, see the Apache Project's WWW site:
  1419.  
  1420.   ╖  Apache Project WWW site  <http://www.apache.org>
  1421.  
  1422.   ╖  Mod_perl module  <http://www.perl.com/cgi-
  1423.      bin/cpan_mod?module=mod_perl>
  1424.  
  1425.   11.2.12.  How do I get persistent connections with DBI and CGI?
  1426.  
  1427.   Using Edmund Mergl's Apache::DBI module, database logins are stored in
  1428.   a hash with each of these httpd child. If your application is based on
  1429.   a single database user, this connection can be started with each
  1430.   child.  Currently, database connections cannot be shared between httpd
  1431.   children.  Apache::DBI can be downloaded from CPAN via:
  1432.  
  1433.   ╖  <http://www.perl.com/cgi-bin/cpan_mod?module=Apache::DBI>
  1434.  
  1435.   11.2.13.  ``When I run a perl script from the command line, it works,
  1436.   but, when I run it under the httpd, it fails!'' Why?
  1437.  
  1438.   Basically, a good chance this is occurring is due to the fact that the
  1439.   user that you ran it from the command line as has a correctly
  1440.   configured set of environment variables, in the case of DBD::Oracle,
  1441.   variables like $ORACLE_HOME, $ORACLE_SID or TWO_TASK.  The httpd
  1442.   process usually runs under the user id of nobody, which implies there
  1443.   is no configured environment. Any scripts attempting to execute in
  1444.   this situation will correctly fail.  To solve this problem, set the
  1445.   environment for your database in a BEGIN ( ) block at the top of your
  1446.   script. This will solve the problem.  Similarly, you should check your
  1447.   httpd error logfile for any clues, as well as the ``Idiot's Guide To
  1448.   Solving Perl / CGI Problems'' and ``Perl CGI Programming FAQ'' for
  1449.   further information. It is unlikely the problem is DBI-related. Read
  1450.   BOTH these documents carefully!
  1451.  
  1452.  
  1453.   ╖  Idiot's Guide to Solving Perl / CGI problems
  1454.      <http://www.perl.com/perl/faq/index.html>
  1455.  
  1456.   11.2.14.  Can I do multi-threading with DBI?
  1457.  
  1458.   As of the current date, no. Perl does not support multi-threading.
  1459.   However, multi-threading is expected to become part of the perl core
  1460.   distribution as of version 5.005, which implies that DBI may support
  1461.   multi-threading fairly soon afterwards.  For some OCI example code for
  1462.   Oracle that has multi-threaded SELECT statements, see:
  1463.  
  1464.   ╖  <http://www.hermetica.com/technologia/oracle/oci/orathreads.tar.gz>
  1465.  
  1466.   11.2.15.  How can I invoke stored procedures with DBI?
  1467.  
  1468.   Assuming that you have created a stored procedure within the target
  1469.   database, eg, an Oracle database, you can use $dbh->do to immediately
  1470.   execute the procedure. For example,
  1471.  
  1472.   $dbh->do( "BEGIN someProcedure END" );
  1473.  
  1474.   11.2.16.  How can I get return values from stored procedures with DBI?
  1475.  
  1476.   Remember to perform error checking, though!
  1477.  
  1478.  
  1479.            $sth = $dbh->prepare( "BEGIN foo(:1, :2, :3); END;" );
  1480.            $sth->bind_param(1, $a);
  1481.            $sth->bind_param_inout(2, \$path, 2000);
  1482.            $sth->bind_param_inout(3, \$success, 2000);
  1483.            $sth->execute;
  1484.  
  1485.  
  1486.  
  1487.  
  1488.   11.2.17.  How can I create or drop a database with DBI?
  1489.  
  1490.   Database creation and deletion are concepts that are entirely too
  1491.   abstract to be adequately supported by DBI. For example, Oracle does
  1492.   not support the concept of dropping a database at all! Also, in
  1493.   Oracle, the database server essentially is the database, whereas in
  1494.   mSQL, the server process runs happily without any databases created in
  1495.   it. The problem is too disparate to attack.  Some drivers, therefore,
  1496.   support database creation and deletion through the private func
  1497.   methods. You should check the documentation for the drivers you are
  1498.   using to see if they support this mechanism.
  1499.  
  1500.   11.2.18.  How are NULL values handled by DBI?
  1501.  
  1502.   NULL values in DBI are specified to be treated as the value undef.
  1503.   NULLs can be inserted into databases as NULL, for example:
  1504.  
  1505.  
  1506.            $rv = $dbh->do( "INSERT INTO table VALUES( NULL )" );
  1507.  
  1508.  
  1509.  
  1510.  
  1511.   but when queried back, the NULLs should be tested against undef. This
  1512.   is standard across all drivers.
  1513.  
  1514.   11.2.19.  What are these func methods all about?
  1515.  
  1516.   The func method is defined within DBI as being an entry point for
  1517.   database-specific functionality, eg, the ability to create or drop
  1518.   databases. Invoking these driver-specific methods is simple, for
  1519.   example, to invoke a createDatabase method that has one argument, we
  1520.   would write:
  1521.  
  1522.  
  1523.            $rv = $dbh->func( 'argument', 'createDatabase' );
  1524.  
  1525.  
  1526.  
  1527.  
  1528.   Software developers should note that the func methods are non-portable
  1529.   between databases.
  1530.  
  1531.   11.2.20.  Commercial Support and Training
  1532.  
  1533.   The Perl5 Database Interface is FREE software. IT COMES WITHOUT
  1534.   WARRANTY OF ANY KIND.  However, some organizations are providing
  1535.   either technical support or training programs on DBI.
  1536.  
  1537.   PERL CLINIC : The Perl Clinic can arrange commercial support contracts
  1538.   for Perl, DBI, DBD::Oracle and Oraperl. Support is provided by the
  1539.   company with whom Tim Bunce, author of DBI, works. For more
  1540.   information on their services, please see :
  1541.  
  1542.   ╖  <http://www.perl.co.uk/tpc>
  1543.  
  1544.   12.  PostgreSQL Management Tools
  1545.  
  1546.  
  1547.   12.1.  PGACCESS - A GUI Tool for PostgreSQL Management
  1548.  
  1549.   PgAccess is a Tcl/Tk interface to PostgreSQL.  It is already included
  1550.   in the distribution of PostgreSQL.  You may want to check out this web
  1551.   site for a newer copy
  1552.  
  1553.   ╖  <http://www.flex.ro/pgaccess>
  1554.  
  1555.   ╖  If you have any comment, suggestion for improvements, please feel
  1556.      free to e-mail to : teo@flex.ro
  1557.  
  1558.   Features of PgAccess
  1559.  
  1560.   PgAccess windows - Main window, Table builder, Table(query) view,
  1561.   Visual query builder.
  1562.  
  1563.   Tables
  1564.  
  1565.   ╖  opening tables for viewing, max 200 records (changed by preferences
  1566.      menu)
  1567.  
  1568.   ╖  column resizing, dragging the vertical grid line (better in table
  1569.      space rather than in the table header)
  1570.  
  1571.   ╖  text wrap in cells - layout saved for every table
  1572.  
  1573.   ╖  import/export to external files (SDF,CSV)
  1574.  
  1575.   ╖  filter capabilities (enter filter like (price>3.14)
  1576.  
  1577.   ╖  sort order capabilities (enter manually the sort field(s))
  1578.  
  1579.   ╖  editing in place
  1580.  
  1581.   ╖  improved table generator assistant
  1582.  
  1583.   ╖  improved field editing
  1584.  
  1585.   Queries
  1586.  
  1587.   ╖  define , edit and stores "user defined queries"
  1588.  
  1589.   ╖  store queries as views
  1590.  
  1591.   ╖  execution of queries
  1592.  
  1593.   ╖  viewing of select type queries result
  1594.  
  1595.   ╖  query deleting and renaming
  1596.  
  1597.   ╖  Visual query builder with drag & drop capabilities. For any of you
  1598.      who had installed the Tcl/Tk plugin for Netscape Navigator, you can
  1599.      see it at work clicking here
  1600.  
  1601.   Sequences
  1602.  
  1603.   ╖  defines sequences, delete them and inspect them Functions
  1604.  
  1605.   ╖  define, inspect and delete functions in SQL language
  1606.  
  1607.   Future implementation will have
  1608.  
  1609.   ╖  table design (add new fields, renaming, etc.)
  1610.  
  1611.   ╖  function definition
  1612.  
  1613.   ╖  report generator
  1614.  
  1615.   ╖  basic scripting
  1616.  
  1617.   If you have any comment, suggestion for improvements e-mail to :
  1618.  
  1619.   ╖  teo@flex.ro
  1620.  
  1621.   Information about libgtcl
  1622.  
  1623.   You will need the PostgreSQL to Tcl interface library libgtcl, lined
  1624.   as a Tcl/Tk 'load'-able module. The libpgtcl and the source is located
  1625.   in the PostgreSQL directory /src/interfaces/libpgtcl. Specifically,
  1626.   you will need a libpgtcl library that is 'load'-able from Tcl/Tk. This
  1627.   is technically different from an ordinary PostgreSQL loadable object
  1628.   file, because libpgtcl is a collection of object files. Under Linux,
  1629.   this is called libpgtcl.so.  You can download from the above site a
  1630.   version already compiled for Linux i386 systems. Just copy libpgtcl.so
  1631.   into your system library director (/usr/lib).  One of the solutions is
  1632.   to remove from the source the line containing load libpgtcl.so and to
  1633.   load pgaccess.tcl not with wish, but with pgwish (or wishpg) that wish
  1634.   that was linked with libpgtcl library.
  1635.  
  1636.   12.2.  Windows Interactive Query Tool for PostgreSQL (WISQL or MPSQL)
  1637.  
  1638.   MPSQL provides users with a graphical SQL interface to PostgresSQL.
  1639.   MPSQL is similar to Oracle's SQL Worksheet and Microsoft SQL Server's
  1640.   query tool WISQL.  It has nice GUI and has history of commands. Also
  1641.   you can cut and paste and it has other nice features to improve your
  1642.   productivity.
  1643.  
  1644.   ╖  <http://www.troubador.com/~keidav/index.html>
  1645.  
  1646.   ╖  Email: keidav@whidbey.com
  1647.  
  1648.   ╖  <http://www.ucolick.org/~de/> in file tcl_syb/wisql.html
  1649.  
  1650.  
  1651.   ╖  <http://www.troubador.com/~keidav/index.html>
  1652.  
  1653.   ╖  Email: de@ucolick.org
  1654.  
  1655.   12.3.  Interactive Query Tool (ISQL) for PostgreSQL called PSQL
  1656.  
  1657.   ISQL is For Character command line terminals.  This is included in the
  1658.   distribution, and is called PSQL. Very similar to Sybase ISQL, Oracle
  1659.   SQLplus. At unix prompt give command 'psql' which will put you in
  1660.   psql> prompt.
  1661.  
  1662.  
  1663.        Type \h to see help of commands.
  1664.  
  1665.  
  1666.  
  1667.  
  1668.   Very user friendly and easy to use.  Can also be accessed from shell
  1669.   scripts.
  1670.  
  1671.   12.4.  MPMGR - A Database Management Tool for PostgresSQL
  1672.  
  1673.   MPMGR will provide a graphical management interface for PostgresSQL.
  1674.   You can find it at
  1675.  
  1676.   ╖  <http://www.troubador.com/~keidav/index.html>
  1677.  
  1678.   ╖  Email: keidav@whidbey.com
  1679.  
  1680.   ╖  <http://www.troubador.com/~keidav/index.html>
  1681.  
  1682.   ╖  <http://www.ucolick.org/~de> in file tcl_syb/wisql.html
  1683.  
  1684.   ╖  WISQL for PostgreSQL  <http://www.ucolick.org/~de/Tcl/pictures>
  1685.  
  1686.   ╖  Email: de@ucolick.org
  1687.  
  1688.   13.  Setting up multi-boxes PostgreSQL with just one monitor
  1689.  
  1690.   You can stack up the cpu-boxes and connect to just one monitor and use
  1691.   the switch box to select the host.  This saves space and you eliminate
  1692.   monitor, keyboard and the mouse (saving anywhere from 100 to 500 US
  1693.   dollars per set) and also avoid lot of clutter.
  1694.  
  1695.   Using this switch box, you can stack up many PostgreSQL servers
  1696.   (development, test, production), Web servers, ftp servers, Intranet
  1697.   servers, Mail servers, News servers in a tower shelf. The switch box
  1698.   can be used for controlling Windows 95/NT or OS/2 boxes as well.
  1699.  
  1700.   Please check out these sites:
  1701.  
  1702.   ╖  Network Technologies Inc
  1703.      <http://www.networktechinc.com/servswt.html> (120 dollars/PC 8
  1704.      ports) which lists
  1705.  
  1706.   ╖  Scene Double Inc, England
  1707.      <http://www.scene.demon.co.uk/qswitch.htm>
  1708.  
  1709.   ╖  Cybex corporation  <http://www.cybex.com>
  1710.  
  1711.   ╖  Raritan Inc  <http://www.raritan.com>
  1712.  
  1713.   ╖  RealStar Solutions Inc  <http://www.real-star.com/kvm.htm>
  1714.  
  1715.   ╖  Belkin Inc  <http://www.belkin.com>
  1716.  
  1717.   ╖  DataComm Warehouse Inc Call 24 hours a day, 7 days a week at
  1718.      1-800-328-2261They supply all varieties of computer hardware
  1719.      <http://www.warehouse.com>
  1720.  
  1721.   ╖  Better Box Communications Ltd.
  1722.      <http://www.betterbox.com/info.html>
  1723.  
  1724.   ╖  Go to nearest hardware store and ask for "Server Switch" also known
  1725.      as "KVM Auto Switches".
  1726.  
  1727.   Search engine yahoo to find more companies with "Server Switches" or
  1728.   "KVM Switches".
  1729.  
  1730.   It is strongly recommended to have a dedicated unix box for each
  1731.   PostgreSQL data-server for better performance. No other application
  1732.   program/processes should run on this box. See the Business section of
  1733.   your local newspapers for local vendors selling only intel box, 13"
  1734.   monochrome monitor (very low cost monitor). Local vendors sell just
  1735.   the hardware without any Microsoft Windows/DOS (saves you about $
  1736.   150).  You do not need a color monitor for the database server, as you
  1737.   can do remote administration from color PC workstation.  Get RedHat
  1738.   (or some other distribution of) Linux cdrom from below -
  1739.  
  1740.   ╖  Linux System Labs Web site:   <http://www.lsl.com/>  7 (U.S.
  1741.      dollars)
  1742.  
  1743.   ╖  Cheap Bytes Inc Web site:   <http://www.cheapbytes.com/> 7 (U.S.
  1744.      dollars)
  1745.  
  1746.      Make sure that the hardware you purchase is supported by Redhat
  1747.      Linux. Check the ftp site of Redhat for recommended hardware like
  1748.      SCSI adapters, video cards before buying.  For just $ 600 you will
  1749.      get a powerful intel box with Redhat Linux running PostgreSQL.  Use
  1750.      odbc/jdbc/perl/tcl to connect to PostgreSQL from Windows95, OS/2,
  1751.      Unix Motif or web browser (e.g. Redbaron, Opera, Netscape, 20
  1752.      others).  (Web browsers are very fast becoming the standard
  1753.      client).
  1754.  
  1755.   Using this idea you can control many cpu boxes by just one monitor and
  1756.   one keyboard!
  1757.  
  1758.   Below is the extract from networktechnic Inc for the "Server Switches"
  1759.  
  1760.   Order now call 800-742-8324 (toll free in USA)
  1761.  
  1762.   To receive our catalog please Email your address to:
  1763.   sales@networktechinc.com
  1764.  
  1765.   CONTROL MULTIPLE PC'S with one keyboard monitor & mouse These
  1766.   electronic switches will allow one keyboard, monitor & mouse to
  1767.   control up to 64 PC's. Embedded microcomputers simulate the presence
  1768.   of keyboard, monitor & mouse to all attached PC's 100% of the time.
  1769.  
  1770.   Features and Applications
  1771.  
  1772.  
  1773.   ╖  Keyboard, front panel or remote control
  1774.  
  1775.   ╖  9 pin D Serial or 6 pin miniDIN mouse support
  1776.  
  1777.   ╖  5 pin DIN or 6 pin miniDIN keyboard support
  1778.  
  1779.   ╖  1600x1200 video resolution with no degradation
  1780.  
  1781.   ╖  Uses standard cables
  1782.  
  1783.   ╖  Desktop or rackmount
  1784.  
  1785.   Specifications - Keyboard
  1786.  
  1787.  
  1788.   ╖  All connectors are female
  1789.  
  1790.   ╖  5 pin DIN or 6 pin miniDIN
  1791.  
  1792.   ╖  Will hard or soft boot all PC's 100% of the time
  1793.  
  1794.   Controls - Buttons on Front
  1795.  
  1796.  
  1797.   ╖  Touch a button and be connected to that PC
  1798.  
  1799.   ╖  Hold any button in for more than 0.5 second and go into SCAN,
  1800.      BROADCAST or COMMAND mode
  1801.  
  1802.   ╖  LEDs on front indicate mode of operation Keyboard
  1803.  
  1804.   ╖  Type CTRL+* and go into COMMAND mode
  1805.  
  1806.   ╖  SCAN, BROADCAST or COMMAND are available
  1807.  
  1808.   Mouse
  1809.  
  1810.   * 9 pin D serial
  1811.  
  1812.   ╖  o NTI switch emulates Microsoft serial mouse to all PC's
  1813.  
  1814.   ╖  o 9 pin D male for mouse
  1815.  
  1816.   ╖  o 9 pin D female for PC's
  1817.  
  1818.   * 6 pin miniDIN
  1819.  
  1820.   ╖  o NTI switch emulates IBM PS/2 style mouse to all PC's
  1821.  
  1822.   ╖  o All connectors are female
  1823.  
  1824.   Wired remote
  1825.  
  1826.   ╖  Optional--must be purchased
  1827.  
  1828.   ╖  Operates same as "Buttons on Front"
  1829.  
  1830.   Monitor-VGA
  1831.  
  1832.   ╖  Bandwidth is 150 MHz
  1833.  
  1834.   ╖  1600X1200 resolution with no degradation
  1835.  
  1836.   ╖  All connectors are female
  1837.  
  1838.   14.  Applications and Tools for PostgreSQL
  1839.  
  1840.   14.1.  PostgreSQL 4GL for web database applications - AppGEN Develop¡
  1841.   ment System
  1842.  
  1843.   AppGEN can be downloaded from
  1844.  
  1845.   ╖  <http://www.man.ac.uk/~whaley/ag/appgen.html>
  1846.  
  1847.   ╖  <ftp://ftp.mcc.ac.uk/pub/linux/ALPHA/AppGEN>.
  1848.  
  1849.      AppGEN is a high level fourth generation language and application
  1850.      generator for producing World Wide Web (WWW) based applications.
  1851.      These applications are typically used over the internet or within a
  1852.      corporate intranet. AppGEN applications are implemented as C
  1853.      scripts conforming to the Common Gateway Interface (CGI) standard
  1854.      supported by most Web Servers.
  1855.  
  1856.   To use AppGEN you will need the following :-
  1857.  
  1858.   PostgresSQL, relational database management system
  1859.  
  1860.   A CGI compatible web server such as NCSA's HTTPD
  1861.  
  1862.   An ansi C compiler such as GCC
  1863.  
  1864.   AppGEN consists of the following Unix (Linux) executables :-
  1865.  
  1866.  
  1867.   ╖  defgen, which produces a basic template application from a logical
  1868.      data structure. The applications are capable of adding, updating,
  1869.      deleting and searching for records within the database whilst
  1870.      automatically maintaining referential integrity.
  1871.  
  1872.  
  1873.   ╖  appgen, the AppGEN compiler which compiles the appgen source code
  1874.      into CGI executable C source and HTML formatted documents ready for
  1875.      deployment on a web server.
  1876.  
  1877.  
  1878.   ╖  dbf2sql, a utility fo converting dBase III compatible .dbf files
  1879.      into executable SQL scripts. This enables data stored in most
  1880.      DOS/Windows based database packages to be migrated to a SQL server
  1881.      such as PostgresSQL.
  1882.  
  1883.   ╖  In addition, AppGEN comprises of a collection of HTML documents,
  1884.      GIF files and Java applets which are used at runtime by the system.
  1885.      And of course, like all good software, the full source code is
  1886.      included.
  1887.  
  1888.   The author, Andrew Whaley, can be contacted on
  1889.  
  1890.   ╖  andrew@arthur.smuht.nwest.nhs.uk
  1891.  
  1892.   14.2.  WWW Web interface for PostgresSQL - DBENGINE
  1893.  
  1894.   dbengine a plug 'n play Web interface for PostgreSQL created by Ingo
  1895.   Ciechowski. It is at
  1896.  
  1897.   ╖  <http://www.cis-computer.com/dbengine/ >
  1898.  
  1899.      About DBENGINE : dbengine is an interface between the WWW and
  1900.      Postgres95 which provides simple access to any existing database
  1901.      within just a few minutes.
  1902.  
  1903.   PHP-FI gives you a Perl like language in your documents, but no real
  1904.   Perl while AppGen and wdb-p95 require that you create some
  1905.   configuration file for each of your databases -- sound's like you'll
  1906.   first of all have to learn some sort of new mata language before you
  1907.   can get started.
  1908.  
  1909.   Unlike other tools you don't have to learn any special programming or
  1910.   scripting language to get started with dbengine. Also there's no
  1911.   configuration file for each database, so you don't have to get
  1912.   familiar with such a new structure.  However - in case you want to
  1913.   gain access to the full features of dbengine it'd be a good idea to
  1914.   know the Perl language.
  1915.   The whole system can be configured by simple manipulations of an
  1916.   additional database that contains closer information about how to
  1917.   visualize your database access.  You can even specify virtual Fields
  1918.   which are calculated on the fly right before they're displayed on the
  1919.   screen.
  1920.  
  1921.   License : dbengine is free software under the same terms as Perl. Read
  1922.   its licence if you aren't sure what you can or can't do. The bottom
  1923.   line is that this is a kinder and gentler version of the GNU licence
  1924.   -- one that doesn't infect your work if you care to borrow from
  1925.   dbengine or package up pieces of it as part of a commercial product.
  1926.  
  1927.   14.3.  Apache Webserver Module for PostgreSQL - NeoSoft NeoWebScript
  1928.  
  1929.   Apache is a well-known Web Server. And a module to interface
  1930.   PostgreSQL to Apache Webserver is at -
  1931.  
  1932.   ╖  <http://www.neosoft.com/neowebscript/>
  1933.  
  1934.      NeoWebScript is a programming language that allows both simple and
  1935.      complex programs to be embedded into HTML files.
  1936.  
  1937.   When an HTML page containing embedded NeoWebScript is requested, the
  1938.   NeoWebScript-enabled webserver executes the embedded script(s),
  1939.   producing a webpage containing customized content created by the
  1940.   program.
  1941.  
  1942.   NeoWebScript is a fast, secure, easy to learn way to do powerful,
  1943.   server-based interactive programming directly in the HTML code in web
  1944.   pages. With NeoWebScript, counters, email forms, graffiti walls, guest
  1945.   books and visitor tracking are all easy, even for a beginning
  1946.   programmer. See how well NeoWebScript holds its' own vs. PERL and
  1947.   JavaScript.
  1948.  
  1949.   If you'd like to install NeoWebScript on your webserver, your
  1950.   Webmaster needs to read our Sysop FAQ to get started. Theory of
  1951.   Operations will explain how NeoWebScript works, while installation
  1952.   will take them through the steps. Management deals with configuration
  1953.   issues and running the server, tests let you verify correct
  1954.   NeoWebScript operation, and troubleshooting deals with server
  1955.   problems.
  1956.  
  1957.   There is no cost to you to use NeoWebScript-2.2 for your ISP, your
  1958.   intranet, or your extranet.  You'll see a full license when you
  1959.   register to download, but it costs $ 99 if you want to embed it in
  1960.   your own product or use it in a commerce (eg. SSL) server.
  1961.  
  1962.   NeoWebScript is a module for the Apache webserver that allows you to
  1963.   embed the Tcl/Tk programming language in your webpages as a scripting
  1964.   tool. It was invented by Karl Lehenbauer, NeoSoft's Chief Technical
  1965.   Officer, and documented, enhanced and extended by NeoSoft's
  1966.   programmers and technical writers.
  1967.  
  1968.   The Apache webserver is the world's most popular webserver, accounting
  1969.   for 68 % of the sites polled.
  1970.  
  1971.   Tcl/Tk is the powerful, free, cross-platform scripting language
  1972.   developed by Dr. John Ousterhout. In his own words
  1973.  
  1974.   "Tcl/Tk lets software developers get the job done ten times faster
  1975.   than with toolkits based on C or C++. It's also a great glue language
  1976.   for making existing applications work together and making them more
  1977.   graphical and Internet-aware."
  1978.  
  1979.   Karl Lehenbauer, Founder and Chief Technical Officer of NeoSoft, has
  1980.   been part of Tcl/Tk development from the very beginning.  Together
  1981.   with Mark Diehkans, they authored Extended Tcl, also known as TclX or
  1982.   NeoSoft Tcl, a powerful set of extensions to the language. Many of the
  1983.   current core Tcl commands originated in Extended Tcl, and were then
  1984.   imported into the core language by Dr.  Ousterhout.
  1985.  
  1986.   NeoSoft Inc., 1770 St. James Place, Suite 500, Houston, TX 77056 USA
  1987.  
  1988.   14.4.  HEITML server side extension of HTML and a 4GL language for
  1989.   PostgreSQL
  1990.  
  1991.   Tool heitml is another way to interface postgres with the world wide
  1992.   web.  For more details contact
  1993.  
  1994.  
  1995.                  Helmut Emmelmann H.E.I. Informationssyteme GmbH
  1996.                  Wimpfenerstrasse 23 Tel. 49-621-795141
  1997.                  68259 Mannheim Germany Fax. 49-621-795161
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.   ╖  E-mail Mr.Helmut Emmelmann at emmel@h-e-i.de
  2004.  
  2005.   ╖  Heitml main web site  <http://www.heitml.com>
  2006.  
  2007.   ╖  Heitml secondary web site  <http://www.h-e-i.deom>
  2008.  
  2009.   heitml is a server side extension of HTML and a 4GL language at the
  2010.   same time. People can write web applications in the HTML style by
  2011.   using new HTML-like tags.
  2012.  
  2013.   heitml (pronounced "Hi"-TML) is an extension of HTML and a full-
  2014.   featured 4th generation language that enables Web-based Applications
  2015.   to interact with data stored in SQL databases, without resorting to
  2016.   complex CGI scripts.
  2017.  
  2018.   heitml extends HTML on the sever side, dynamically converting ".hei"
  2019.   files to HTML format and so is compatible with any web browser.It
  2020.   embraces the familiar, easy-to-use HTML syntax and provides a large
  2021.   assortment of pre-developed Tags and Libraries to take care of tasks
  2022.   that formerly required CGI. As XML, heitml provides user defined tags.
  2023.   With heitml the user defined markup can be translated to HTML and send
  2024.   to a browser.
  2025.  
  2026.   heitml targets both HTML designers and professional programmers alike.
  2027.   HTML designers can use heitml Tags to build dynamic web pages, access
  2028.   SQL databases, or create complete web applications. Counters,
  2029.   registration databases, search forms, email forms, or hierarchical
  2030.   menues can all be created simply by using the pre-developed HTML-like
  2031.   Tags found in the many Component Libraries.
  2032.  
  2033.   For programmers heitml embeds a complete forth generation language in
  2034.   HTML
  2035.  
  2036.  
  2037.                  (e.g. <if>, <while>, and <let> Tags),
  2038.  
  2039.  
  2040.  
  2041.  
  2042.   plus powerful expression evaluation with integer, real, boolean,
  2043.   string, and tuple data types. Tuples have reference semantics as in
  2044.   modern object oriented languages and are stored on a heap. heitml
  2045.   variables including all complex data structures stored on the heap
  2046.   maintain their values between pages using the Session Mode. It is
  2047.   possible to define your own tags or environment tags and even re-
  2048.   define HTML-tags.
  2049.  
  2050.   heitml makes it possible to
  2051.  
  2052.   - - - develop Web Sites in a structured and modular way, drastically
  2053.   reducing maintenance overhead.
  2054.  
  2055.   - - - develop intelligent and interactive Web Sites, with content that
  2056.   dynamically adapts itself to user needs.
  2057.  
  2058.   - - - show the content of SQL databases with no programming other than
  2059.   to use our library of prefined "dba" Tags.
  2060.  
  2061.   - - - develop complex database and Catalog Shopping applications using
  2062.   Session Variables
  2063.  
  2064.   heitml runs on Linux with any Web Server using the CGI interface, and
  2065.   is especially fast (avoiding the CGI overhead) within the APACHE Web
  2066.   Server using the apache API. Currently MSQL (Version 1 and 2),
  2067.   PostgreSQL (Version 6), mysql, and the yard databases are supported).
  2068.   heitml also works on Linux, BSDi, Solaris and SunOS, as well as
  2069.   Windows NT with CGI and ISAPI and ODBC and Windows 95.
  2070.  
  2071.   heitml (on linux) is free for research, non-commercial and private
  2072.   usage. Commercial Web Sites must pay a licensing fee. The fully
  2073.   operational version of heitml is available for a trial period
  2074.   downloaded freely. (Note, however, that each ".hei" Web Page you
  2075.   develop will display a message identifying it as the version for non-
  2076.   commercial use. After registration, you will receive a key to switch
  2077.   off the message without having to re-install the program.)
  2078.  
  2079.   heitml (pronounced "Hi"-TML) significantly extends and enhances the
  2080.   functionality of HTML by definable tags and full programming features.
  2081.   This makes dynamic content and database applications possible simply
  2082.   within the HTML world, without CGI and without external scripting or
  2083.   programming languages.  This means you, as an HTML author, can embed
  2084.   applications in your web pages, simply by using some new tags without
  2085.   CGI and without programming. As an advanced user or programmer on the
  2086.   other hand you can create and program powerful tag libraries. This
  2087.   approach makes heitml suitable for HTML newcomers and professional
  2088.   programmers alike.  heitml runs on the web server and dynamically
  2089.   generates HTML, so heitml is compatible with the internet standards
  2090.   and with any web browser. It allows full access to databases while
  2091.   shielding the user from any unneccessary CGI complexity. heitml has
  2092.   been developed according to the newst research and in compiler
  2093.   construction and transaction systems.
  2094.  
  2095.   heitml pages are developed just the same way as HTML pages, with a
  2096.   text editor or HTML editor, and placed on the web server as usual.
  2097.   However now pages can contain dynamic heitml tags and access tag
  2098.   libraries.  You can use these tags to access the database, to create
  2099.   dynamic content, to send emails, and even to create powerful
  2100.   applications like registration databases and shopping systems.
  2101.  
  2102.   HTML newcomers and professional programmers alike will be amazed at
  2103.   how quickly and easily they can design exciting applications like our
  2104.   Interactive Guestbook without resorting to complex and difficult to
  2105.   learn CGI scripts, simply by using the tools provided in our dba
  2106.   Library.
  2107.  
  2108.   heitml is accompanied by a wide range of tag libraries, to create
  2109.   guestbooks, database maintenance applications, extensible query forms,
  2110.   powerful email forms or structure your web site using a hierarchic
  2111.   menu. These tools are ready to go, just add the corresponding tags to
  2112.   your web site.
  2113.   As an experienced programmer you can make fully use of the heitml
  2114.   persistent dynamic tuple architecture : heitml is not just a scripting
  2115.   language with dynamic typing, full power expression evaluation,
  2116.   recursive procedures and extensive parameter passing features, but it
  2117.   also features persistent dynamic tuples to automatically keep session
  2118.   data of any size.
  2119.  
  2120.   14.5.  America On-line AOL Web server for PostgreSQL
  2121.  
  2122.   The no-cost commercial webserver, AOLserver version 2.3 supports
  2123.   database connections to PostgreSQL 6.2.1 and higher.  for more info
  2124.   see
  2125.  
  2126.   ╖  AOL Web Server  <http://www.aolserver.com>
  2127.  
  2128.   14.6.  Problem/Project Tracking System Application Tool for PostgreSQL
  2129.  
  2130.   This is at
  2131.  
  2132.   ╖  <http://www.homeport.org/~shevett/pts/>
  2133.  
  2134.   14.7.  Convert dbase dbf files to PostgreSQL
  2135.  
  2136.   The program dbf2msql works fine with mSQL and PostgreSQL. You can find
  2137.   it at
  2138.  
  2139.   ╖  <ftp://ftp.nerosworld.com/pub/SQL/dbf2sql/>
  2140.  
  2141.   ╖  <ftp://ftp.postgresql.org/pub/incoming/dbf2pg-3.0.tar.gz>
  2142.  
  2143.   This program was written by Maarten Boekhold, Faculty of Electrical
  2144.   Engineering TU Delft, NL Computer Architecture and Digital Technique
  2145.   section
  2146.  
  2147.   ╖  M.Boekhold@et.tudelft.nl
  2148.  
  2149.   You can also use a python method to read dbf files and load into a
  2150.   postgres database.
  2151.  
  2152.   ╖  See  <http://www.python.org>
  2153.  
  2154.   15.  Web Database Design/Implementation tool for PostgreSQL - EARP
  2155.  
  2156.  
  2157.   ╖  <http://www.oswego.edu/Earp>
  2158.  
  2159.   ╖  <ftp://ftp.oswego.edu> in the directory 'pub/unix/earp'.
  2160.  
  2161.   15.1.  What is EARP ?
  2162.  
  2163.   The "Easily Adjustable Response Program" (EARP) created by David
  2164.   Dougherty.  EARP is a Web Database Design/Implementation tool, built
  2165.   on top of the PostgreSQL database system. Its functionality includes:
  2166.  
  2167.  
  2168.   ╖  A Visual Design System.
  2169.  
  2170.   ╖  A sendmail interface. (can handle incoming and outgoing mail)
  2171.  
  2172.   ╖  An Enhanced Security Mechanism.
  2173.  
  2174.   ╖  A cgi driver.
  2175.  
  2176.  
  2177.  
  2178.  
  2179.   15.2.  Implementation
  2180.  
  2181.   The main implementation of EARP is a CGI binary which runs under the
  2182.   http daemon to provide access to the database server. All of the
  2183.   design tools are built into the driver, no design takes place over
  2184.   anything but the web. The tools themselves require a graphical
  2185.   browser, the compatibility of objects designed with the tools is
  2186.   implementation independent, based on designing individuals
  2187.   preferences.
  2188.  
  2189.   15.3.  What you need to run EARP
  2190.  
  2191.   EARP will likely run on a variety of platforms with little or no
  2192.   porting. The known working platforms consist of the following:
  2193.  
  2194.   ╖  Solaris 2.5
  2195.  
  2196.   ╖  Linux 1.2.13+
  2197.  
  2198.   ╖  GNU C++
  2199.  
  2200.   ╖  PostgreSQL (Version 1.01 / 1.02 )
  2201.  
  2202.   ╖  netsite server
  2203.  
  2204.   ╖  NCSA httpd
  2205.  
  2206.  
  2207.   ╖  GNU C++
  2208.  
  2209.   ╖  PostgreSQL (Version 1.01 / 1.02 )
  2210.  
  2211.   ╖  NCSA httpd
  2212.  
  2213.   ╖  Apache httpd
  2214.  
  2215.      The current (1.3) release of Earp was designed on top of the libpq
  2216.      release that came with PostgreSQL v1.01/1.02.  If you are using a
  2217.      more recent version of Postgres, expect that the program will
  2218.      require some porting to work correctly. In the development version
  2219.      (Earp 2.0), libpq support is being incorporated as a module.
  2220.  
  2221.   15.4.  How does it work ?
  2222.  
  2223.   One of the main features of EARP is that it uses an Object Oriented
  2224.   approach to producing html pages which interface to the database. Most
  2225.   pages will consist of several objects. Each object is produced by some
  2226.   sort of tool and given a name, objects are then linked together in a
  2227.   callable sequence by the page tool. Objects are also reusable across
  2228.   multiple pages.  Basic tools exist for HTML, Querys, Grabbing input
  2229.   from forms, Extendable Formatting of Query and Input objects, and
  2230.   Linking together of objects into other objects. More advanced tools
  2231.   include the mail tool and the multithreaded query tool.
  2232.  
  2233.   Another feature of EARP is advanced security. Access to various areas
  2234.   of the EARP system can be limited in a variety of ways. To facilitate
  2235.   its advanced security, EARP performs checks for each connection to the
  2236.   system, determining what ids and groups the connecting agent belongs
  2237.   to. Access to areas is defined seperately, and the combination decides
  2238.   if access to a specific area of Earp is allowed. Moreover, all that is
  2239.   required to implement the security features is an http server that
  2240.   supports basic (or better) user authentication.
  2241.  
  2242.  
  2243.  
  2244.  
  2245.   15.5.  Where to get EARP ?
  2246.  
  2247.   EARP is available via anonymous ftp from
  2248.  
  2249.   ╖  <ftp://ftp.oswego.edu> in the directory 'pub/unix/earp'.
  2250.  
  2251.   16.  PHP/FI Server-side html-embedded scripting language for Post¡
  2252.   greSQL
  2253.  
  2254.   WWW Interface Tool
  2255.  
  2256.   ╖  <http://www.php.net>
  2257.  
  2258.   ╖  <http://www.vex.net/php>
  2259.  
  2260.   Old name Professional Home Pages (PHP) and new name is PHP Hypertext
  2261.   Pre-Processor
  2262.  
  2263.   ╖  <http://www.php.org>
  2264.  
  2265.   ╖  Mirror sites are in many countries and are in www.country.php.org
  2266.      like <http://www.fe.de.php.org> <http://www.sk.php.org>
  2267.  
  2268.   ╖  <http://php.iquest.net/>
  2269.  
  2270.   Questions e-mail to :
  2271.  
  2272.   ╖  rasmus@lerdorf.on.ca
  2273.  
  2274.      PHP/FI is a server-side html-embedded scripting language. It lets
  2275.      you write simple scripts right in your .HTML files much like
  2276.      JavaScript does, except, unlike JavaScript PHP/FI is not browser-
  2277.      dependant. JavaScript is a client-side html-embedded language while
  2278.      PHP/FI is a server-side language. PHP/FI is similar in concept to
  2279.      Netscape's LiveWire Pro product. If you have the money, you run
  2280.      Netscape's Commerce Server and you run one of the supported
  2281.      operating systems, you should probably have a look at LiveWire Pro.
  2282.      If you like free fast-moving software that comes with full source
  2283.      code you will probably like PHP/FI.
  2284.  
  2285.   16.1.  Major Features
  2286.  
  2287.   Standard CGI, FastCGI and Apache module Support As a standard CGI
  2288.   program, PHP/FI can be installed on any Unix machine running any Unix
  2289.   web server. With support for the new FastCGI standard, PHP/FI can take
  2290.   advantage of the speed improvements gained through this mechanism. As
  2291.   an Apache module, PHP/FI becomes an extremely powerful and lightning
  2292.   fast alternative to CGI programmimg.
  2293.  
  2294.  
  2295.   ╖  Access Logging With the access logging capabilities of PHP/FI,
  2296.      users can maintain their own hit counting and logging. It does not
  2297.      use the system's central access log files in any way, and it
  2298.      provides real-time access monitoring. The Log Viewer Script
  2299.      provides a quick summary of the accesses to a set of pages owned by
  2300.      an individual user. In addition to that, the package can be
  2301.      configured to generate a footer on every page which shows access
  2302.      information. See the bottom of this page for an example of this.
  2303.  
  2304.   ╖  Access Control A built-in web-based configuration screen handles
  2305.      access control configuration. It is possible to create rules for
  2306.      all or some web pages owned by a certain person which place various
  2307.      restrictions on who can view these pages and how they will be
  2308.      viewed. Pages can be password protected, completely restricted,
  2309.      logging disabled and more based on the client's domain, browser, e-
  2310.      mail address or even the referring document.
  2311.   ╖  Postgres Support Postgres is an advanced free RDBMS. PHP/FI
  2312.      supports embedding Postgres95 and PostgreSQL SQL queries directly
  2313.      in .html files.
  2314.  
  2315.  
  2316.   ╖  RFC-1867 File Upload Support File Upload is a new feature in
  2317.      Netscape 2.0. It lets users upload files to a web server. PHP/FI
  2318.      provides the actual Mime decoding to make this work and also
  2319.      provides the additional framework to do something useful with the
  2320.      uploaded file once it has been received.
  2321.  
  2322.   ╖  HTTP-based authentication control PHP/FI can be used to create
  2323.      customized HTTP-based authentication mechanisms for the Apache web
  2324.      server.
  2325.  
  2326.   ╖  Variables, Arrays, Associative Arrays PHP/FI supports typed
  2327.      variables, arrays and even Perl-like associative arrays. These can
  2328.      all be passed from one web page to another using either GET or POST
  2329.      method forms.
  2330.  
  2331.   ╖  Conditionals, While Loops PHP/FI supports a full-featured C-like
  2332.      scripting language.  You can have if/then/elseif/else/endif
  2333.      conditions as well as while loops and switch/case statements to
  2334.      guide the logical flow of how the html page should be displayed.
  2335.  
  2336.   ╖  Extended Regular Expressions Regular expressions are heavily used
  2337.      for pattern matching, pattern substitutions and general string
  2338.      manipulation. PHP/FI supports all common regular expression
  2339.      operations.
  2340.  
  2341.   ╖  Raw HTTP Header Control The ability to have web pages send
  2342.      customized raw HTTP headers based on some condition is essential
  2343.      for high-level web site design. A frequent use is to send a
  2344.      Location: URL header to redirect the calling client to some other
  2345.      URL. It can also be used to turn off cacheing or manipulate the
  2346.      last update header of pages.
  2347.  
  2348.   ╖  On-the-fly GIF image creation PHP/FI has support for Thomas
  2349.      Boutell's GD image library which makes it possible to generate GIF
  2350.      images on the fly.
  2351.  
  2352.   ╖  ISP "Safe Mode" support PHP/FI supports a unique "Safe Mode" which
  2353.      makes it safe to have multiple users run PHP scripts on the same
  2354.      server.
  2355.  
  2356.   ╖  It's Free!  One final essential feature. The package is completely
  2357.      free.  It is licensed under the GPL which allows you to use the
  2358.      software for any purpose, commercial or otherwise. See the GNU
  2359.      Public License document for complete details.
  2360.  
  2361.   16.2.  Credits
  2362.  
  2363.   * Large parts of this code were developed at and for the University of
  2364.   Toronto. Many thanks to Lee Oattes of the Network Development
  2365.   Department at the university for constant constructive criticism.
  2366.  
  2367.   * The PostgreSQL support code was written by Adam Sussman
  2368.  
  2369.   ╖  asussman@vidya.com
  2370.  
  2371.   * Countless others have helped test and debug the package.
  2372.  
  2373.   16.3.  PHP/FI Version 2.0 - Brief History
  2374.  
  2375.   PHP began life as a simple little cgi wrapper written in Perl. It was
  2376.   never intended to go beyond own private use.  The name of this first
  2377.   package was Personal Home Page Tools, which later became Personal Home
  2378.   Page Construction Kit.
  2379.  
  2380.   A tool was written to easily embed SQL queries into web pages. It was
  2381.   basically another CGI wrapper that parsed SQL queries and made it easy
  2382.   to create forms and tables based on these queries. This tool was named
  2383.   FI (Form Interpreter).
  2384.  
  2385.   PHP/FI version 2.0 is a complete rewrite of these two packages
  2386.   combined into a single program. It has now evolved to the point where
  2387.   it is a simple programming language embedded inside HTML files. The
  2388.   original acronym, PHP, has stuck. It isn't really appropriate any
  2389.   longer. PHP/FI is used more for entire web sites today than for small
  2390.   Personal Home Page setups. By whatever name, it eliminates the need
  2391.   for numerous small Perl cgi programs by allowing you to place simple
  2392.   scripts directly in your HTML files. This speeds up the overall
  2393.   performance of your web pages since the overhead of forking Perl
  2394.   several times has been eliminated. It also makes it easier to manage
  2395.   large web sites by placing all components of a web page in a single
  2396.   html file. By including support for various databases, it also makes
  2397.   it trivial to develop database enabled web pages. Many people find the
  2398.   embedded nature much easier to deal with than trying to create
  2399.   separate HTML and CGI files.
  2400.  
  2401.   Throughout this documentation any references to PHP, FI or PHP/FI all
  2402.   refer to the same thing. The difference between PHP and FI is only a
  2403.   conceptual one. Both are built from the same source distribution.
  2404.  
  2405.   16.4.  So, what can I do with PHP/FI ?
  2406.  
  2407.   The first thing you will notice if you run a page through PHP/FI is
  2408.   that it adds a footer with information about the number of times your
  2409.   page has been accessed (if you have compiled access logging into the
  2410.   binary). This is just a very small part of what PHP/FI can do for you.
  2411.   It serves another very important role as a form interpreter cgi, hence
  2412.   the FI part of the name. For example, if you create a form on one of
  2413.   your web pages, you need something to process the information on that
  2414.   form. Even if you just want to pass the information to another web
  2415.   page, you will have to have a cgi program do this for you. PHP/FI
  2416.   makes it extremely easy to take form data and do things with it.
  2417.  
  2418.   16.5.  A simple example
  2419.  
  2420.   Suppose you have a form:
  2421.  
  2422.  
  2423.        <FORM ACTION="/cgi-bin/php.cgi/~userid/display.html" METHOD=POST>
  2424.        <INPUT TYPE="text" name="name">
  2425.        <INPUT TYPE="text" name="age">
  2426.        <INPUT TYPE="submit">
  2427.        <FORM>
  2428.  
  2429.  
  2430.  
  2431.  
  2432.   Your display.html file could then contain something like:
  2433.  
  2434.  
  2435.        < ?echo "Hi $ name, you are $ age years old!<p>" >
  2436.  
  2437.  
  2438.  
  2439.  
  2440.   It's that simple! PHP/FI automatically creates a variable for each
  2441.   form input field in your form. You can then use these variables in the
  2442.   ACTION URL file.
  2443.   The next step once you have figured out how to use variables is to
  2444.   start playing with some logical flow tags in your pages. For example,
  2445.   if you wanted to display different messages based on something the
  2446.   user inputs, you would use if/else logic. In our above example, we can
  2447.   display different things based on the age the user entered by changing
  2448.   our display.html to:
  2449.  
  2450.  
  2451.        <?
  2452.            if($age>50);
  2453.                echo "Hi $name, you are ancient!<p>";
  2454.            elseif($age>30);
  2455.                echo "Hi $name, you are very old!<p>";
  2456.            else;
  2457.                echo "Hi $name.";
  2458.            endif;
  2459.        >
  2460.  
  2461.  
  2462.  
  2463.  
  2464.   PHP/FI provides a very powerful scripting language which will do much
  2465.   more than what the above simple example demonstrates. See the section
  2466.   on the PHP/FI Script Language for more information.
  2467.  
  2468.   You can also use PHP/FI to configure who is allowed to access your
  2469.   pages.  This is done using a built-in configuration screen. With this
  2470.   you could for example specify that only people from certain domains
  2471.   would be allowed to see your pages, or you could create a rule which
  2472.   would password protect certain pages. See the Access Control section
  2473.   for more details.
  2474.  
  2475.   PHP/FI is also capable of receiving file uploads from any RFC-1867
  2476.   compliant web browser. This feature lets people upload both text and
  2477.   binary files. With PHP/FI's access control and logical functions, you
  2478.   have full control over who is allowed to upload and what is to be done
  2479.   with the file once it has been uploaded. See the File Upload section
  2480.   for more details.
  2481.  
  2482.   PHP/FI has support for the PostgreSQL database package. It supports
  2483.   embedded SQL queries in your .HTML files. See the section on
  2484.   PostgreSQL Support for more information.
  2485.  
  2486.   PHP/FI also has support for the mysql database package. It supports
  2487.   embedded SQL queries in your .HTML files. See the section on mysql
  2488.   Support for more information.
  2489.  
  2490.   16.6.  CGI Redirection
  2491.  
  2492.  
  2493.   16.6.1.  Apache 1.0.x Notes
  2494.  
  2495.   A good way to run PHP/FI is by using a cgi redirection module with the
  2496.   Apache server. Please note that you do not need to worry about
  2497.   redirection modules if you are using the Apache module version of
  2498.   PHP/FI. There are two of these redirection modules available. One is
  2499.   developed by Dave Andersen
  2500.  
  2501.   ╖  angio@aros.net
  2502.  
  2503.      and it is available at
  2504.  
  2505.   ╖  <ftp://ftp.aros.net/pub/util/apache/mod_cgi_redirect.c>
  2506.  
  2507.      and the other comes bundled with Apache and is called
  2508.      mod_actions.c. The modules are extremely similar. They differ
  2509.      slightly in their usage. Both have been tested and both work with
  2510.      PHP/FI.
  2511.  
  2512.   Check the Apache documentation on how to add a module. Generally you
  2513.   add the module name to a file called Configuration. The line to be
  2514.   added if you want to use the mod_actions module is:
  2515.  
  2516.   Module action_module mod_actions.o
  2517.  
  2518.   If you are using the mod_cgi_redirect.c module add this line:
  2519.  
  2520.   Module cgi_redirect_module mod_cgi_redirect.o
  2521.  
  2522.   Then compile your httpd and install it. To configure the cgi
  2523.   redirection you need to either create a new mime type in your
  2524.   mime.types file or you can use the AddType command in your srm.conf
  2525.   file to add the mime type. The mime type to be added should be
  2526.   something like this:
  2527.  
  2528.  
  2529.             application/x-httpd-php phtml
  2530.  
  2531.  
  2532.  
  2533.  
  2534.   If you are using the mod_actions.c module you need to add the follow¡
  2535.   ing line to your srm.conf file:
  2536.  
  2537.  
  2538.             Action application/x-httpd-php /cgi-bin/php.cgi
  2539.  
  2540.  
  2541.  
  2542.  
  2543.   If you are using mod_cgi_redirect.c you should add this line to
  2544.   srm.conf:
  2545.  
  2546.  
  2547.             CgiRedirect application/x-httpd-php /cgi-bin/php.cgi
  2548.  
  2549.  
  2550.  
  2551.  
  2552.   Don't try to use both mod_actions.c and mod_cgi_redirect.c at the same
  2553.   time.
  2554.  
  2555.   Once you have one of these cgi redirection modules installed and
  2556.   configured correctly, you will be able to specify that you want a file
  2557.   parsed by php/fi simply by making the file's extension .phtml.
  2558.   Furthermore, if you add index.phtml to your DirectoryIndex
  2559.   configuration line in your srm.conf file then the top-level page in a
  2560.   directory will be automatically parsed by php if your index file is
  2561.   called index.phtml.
  2562.  
  2563.   16.6.2.  Netscape HTTPD
  2564.  
  2565.   You can automatically redirect requests for files with a given
  2566.   extension to be handled by PHP/FI by using the Netscape Server CGI
  2567.   Redirection module. This module is available in the File Archives on
  2568.   the PHP/FI Home Page. The README in the package explicitly explains
  2569.   how to configure it for use with PHP/FI.
  2570.  
  2571.   16.6.3.  NCSA HTTPD
  2572.  
  2573.   NCSA does not currently support modules, so in order to do cgi
  2574.   redirection with this server you need to modify your server source
  2575.   code. A patch to do this with NCSA 1.5 is available in the PHP/FI file
  2576.   archives.
  2577.  
  2578.   16.7.  Running PHP/FI from the command line
  2579.  
  2580.   If you build the CGI version of PHP/FI, you can use it from the
  2581.   command line simply typing: php.cgi filename where filename is the
  2582.   file you want to parse. You can also create standalone PHP/FI scripts
  2583.   by making the first line of your script look something like:
  2584.  
  2585.  
  2586.            #!/usr/local/bin/php.cgi -q
  2587.  
  2588.  
  2589.  
  2590.  
  2591.   The "-q" suppresses the printing of the HTTP headers. You can leave
  2592.   off this option if you like.
  2593.  
  2594.   17.  Python Interface for PostgreSQL
  2595.  
  2596.   Python in an interpreted, object orientated scripting language.  It is
  2597.   simple to use (light syntax, simple and straighforward statements),
  2598.   and has many extensions for building GUIs, interfacing with WWW, etc.
  2599.   An intelligent web browser (HotJava like) is currently under
  2600.   development (november 1995), and this should open programmers many
  2601.   doors. Python is copyrighted by Stichting S Mathematisch Centrum,
  2602.   Amsterdam, The Netherlands, and is freely distributable.  It contains
  2603.   support for dynamic loading of objects, classes, modules, and
  2604.   exceptions.  Adding interfaces to new system libraries through C code
  2605.   is straightforward, making Python easy to use in custom settings.
  2606.   Python is a very high level scripting language with X interface.
  2607.   Python package is distributed on Linux cdroms includes most of the
  2608.   standard Python modules, along with modules for interfacing to the Tix
  2609.   widget set for Tk.
  2610.  
  2611.   PyGreSQL is a python module that interfaces to a PostgreSQL database.
  2612.   It embeds the PostgreSQL query library to allow easy use of the
  2613.   powerful PostgreSQL features from a Python script.  PyGreSQL is
  2614.   written by D'Arcy J.M. Cain and Pascal Andre.
  2615.  
  2616.   ╖  New site of PyGreSQL  <http://www.druid.net/pygresql/>
  2617.  
  2618.   ╖  Maintained by D'Arcy at  <http://www.druid.net/~darcy/>
  2619.  
  2620.   ╖  Old site is at
  2621.      <ftp://ftp.via.ecp.fr/pub/python/contrib/Database/PyGres95.README >
  2622.  
  2623.   ╖  D'Arcy J.M. Cain darcy@druid.net
  2624.  
  2625.   ╖  Pascal Andre andre@chimay.via.ecp.fr
  2626.  
  2627.   ╖  Pascal Andre andre@via.ecp.fr
  2628.  
  2629.  
  2630.   17.1.  Where to get PyGres ?
  2631.  
  2632.   The home sites of the differents packages are:
  2633.  
  2634.   ╖  Python
  2635.      <ftp://ftp.python.org:/pub/www.python.org/1.5/python1.5b2.tar.gz>
  2636.  
  2637.   ╖  PyGreSQL  <ftp://ftp.druid.net/pub/distrib/PyGreSQL-2.1.tgz>
  2638.  
  2639.   ╖  Old site
  2640.      <ftp://ftp.via.ecp.fr/pub/python/contrib/Database/PyGres95-1.0b.tar.gz
  2641.      >
  2642.  
  2643.      You should anyway try to find some mirror site closer of your site.
  2644.      Refer to the information sources to find these sites. PyGreSQL
  2645.      should reside in the contrib directories of Python and PostgreSQL
  2646.      sites.
  2647.  
  2648.   17.2.  Information and support
  2649.  
  2650.   If you need information about these packages please check their web
  2651.   sites:
  2652.  
  2653.   ╖  Python :      <http://www.python.org/>
  2654.  
  2655.   ╖  PostgreSQL :
  2656.      <http://epoch.cs.berkeley.edu:8000/postgres95/index.html>
  2657.  
  2658.   ╖  PyGreSQL  <ftp://ftp.druid.net/pub/distrib/PyGreSQL-2.1.tgz>
  2659.  
  2660.   ╖  Old site PyGreSQL :
  2661.      <http://www.via.ecp.fr/via/products/pygres.html>
  2662.  
  2663.   For support :
  2664.  
  2665.   ╖  Mailing list for PyGreSQL. You can join by sending email to
  2666.      majordomo@vex.net with the line "subscribe pygresql name@domain" in
  2667.      the body replacing "name@domain" with your own email address.
  2668.  
  2669.   ╖  Newsgroup for Python :     newsgroup comp.lang.python
  2670.  
  2671.   ╖  PyGreSQL :   contact Andre at andre@via.ecp.fr for bug reports,
  2672.      ideas, remarks
  2673.  
  2674.   18.  Gateway between PostgreSQL and the WWW - WDB-P95
  2675.  
  2676.  
  2677.   18.1.  About wdb-p95
  2678.  
  2679.   WDB-P95 - A Web interface to PostgreSQL Databases was created by J.
  2680.   Douglas Dunlop It is at
  2681.  
  2682.   ╖  New versions of WWW-WDB is at  <http://www.eol.ists.ca/~dunlop/wdb-
  2683.      p95/>
  2684.  
  2685.   ╖  For questions or to join Mailing lists contact dunlop@eol.ists.ca
  2686.  
  2687.      This is a modified version of wdb-1.3a2 which provides a gateway to
  2688.      a the WWW for PostgreSQL. This version also requires a Browser that
  2689.      is capable of handling HTML Tables for the tabular output. This is
  2690.      not required by the original wdb and can be fairly easily reverted.
  2691.  
  2692.   You can try out CASI Tape and Image Query. You can have a peek at the
  2693.   Form Definition File (FDF) which is used to create the CASI Tape and
  2694.   Image Query too, which includes a JOIN of 2 tables.
  2695.  
  2696.   This release contains all files necessary to install and run WDB-P95
  2697.   as an interface to your PostgreSQL databases. To port this system to
  2698.   other database should be relatively easy - provided that it supports
  2699.   standard SQL and has a Perl interface.
  2700.  
  2701.   18.2.  Does the PostgreSQL server, pgperl, and httpd have to be on the
  2702.   same host?
  2703.  
  2704.   No - the PostgreSQL server does not have to be on the same host. As
  2705.   WDB-P95 is called by the http daemon, they have to be on the same
  2706.   host. - And as WDB-P95 was written to use Pg.pm - pgperl has to be on
  2707.   the same host too.  Pgperl was written using the libpq library, so it
  2708.   will be able to access any PostgreSQL server anywhere in the net, just
  2709.   like any other PostgreSQL client. As illustrated below
  2710.  
  2711.   (WWW Client (Netscape)) => (HTTP Server (NCSA's http) + WDB-P95 +
  2712.   pgperl + libpq)=> (PostgreSQL server)
  2713.  
  2714.   Curly brackets () represent machines.
  2715.  
  2716.   Each machine can be of a different type : NT, SUN, HP, ... but you
  2717.   need the libpq interface library for the machine type where you plan
  2718.   to use WDB-P95, as you need it to compile pgperl. (The system was
  2719.   designed to use HTML tables so a recent WWW client is best)
  2720.  
  2721.   19.  "C", "C++", ESQL/C language Interfaces and Bitwise Operators for
  2722.   PostgreSQL
  2723.  
  2724.  
  2725.   19.1.  "C" interface
  2726.  
  2727.   It is included in distribution and is called 'libpq'. Similar to
  2728.   Oracle OCI, Sybase DB-lib, Informix CLI libraries.
  2729.  
  2730.  
  2731.   19.2.  "C++" interface
  2732.  
  2733.   It is included in distribution and is called 'libpq++'.
  2734.  
  2735.  
  2736.   19.3.  ESQL/C
  2737.  
  2738.   ESQL/C 'Embedded C Pre-compiler' for PostgreSQL ESQL/C is like Oracle
  2739.   Pro*C, Informix ESQL/C.  The PostgreSQL ESQL/C is an SQL application-
  2740.   programming interface (API) enables the C programmer to create custom
  2741.   applications with database-management capabilities. The PostgreSQL
  2742.   ESQL/C allows you to use a third-generation language with which you
  2743.   are familiar and still take advantage of the Structured Query Language
  2744.   (SQL).
  2745.  
  2746.   ESQL/C consists of the following pieces of software:
  2747.  
  2748.   ╖  The ESQL/C libraries of C functions provide access to the database
  2749.      server.
  2750.  
  2751.   ╖  The ESQL/C header files provide definitions for the data
  2752.      structures, constants, and macros useful to the ESQL/C program.
  2753.  
  2754.   ╖  The ESQL/C preprocessor, is a source-code preprocessor that
  2755.      converts a C file containing SQL statements into an executable
  2756.      file.
  2757.  
  2758.      It is at
  2759.  
  2760.   ╖  ESQL/C for PostgreSQL is already included in the distribution.
  2761.  
  2762.   ╖  Main site  <ftp://ftp.lysator.liu.se/pub/linus>
  2763.  
  2764.   ╖  Email : linus@epact.se
  2765.  
  2766.   19.4.  BitWise Operators for PostgreSQL
  2767.  
  2768.   Bitwise operators was written by Nicolas Moldavsky
  2769.  
  2770.   ╖  nico@overnet.com.ar
  2771.  
  2772.      "C" functions that implement bitwise operators (AND, OR, XOR, bit
  2773.      complement) on pgsql. Get them by anonymous FTP from
  2774.  
  2775.   ╖  <ftp://ftp.overnet.com.ar/pub/utils/linux/bitpgsql.tgz>
  2776.  
  2777.      Makefile for Linux is included.
  2778.  
  2779.   20.  Japanese Kanji Code for PostgreSQL
  2780.  
  2781.   It is at the following site
  2782.  
  2783.   ╖  <ftp://ftp.sra.co.jp/pub/cmd/postgres/>
  2784.  
  2785.   21.  PostgreSQL Port to Windows 95/Windows NT
  2786.  
  2787.   Port to Windows 95/Windows NT is underway.  Porting is being done
  2788.   using gcc, gmake for Win NT/95. To compile source code on win32 gnu-
  2789.   win32 program is used.  GNU gcc is available for win32. Check this
  2790.   site -
  2791.  
  2792.   ╖  <http://www.cygnus.com/misc/gnu-win32>
  2793.  
  2794.      At this site and get the file cdk.exe (self-extractor file for gnu-
  2795.      win32)
  2796.  
  2797.   Porting can also be done using the following "Unix-Emulator on NT"
  2798.   tool from
  2799.  
  2800.   ╖  <http://www.softway.com>
  2801.  
  2802.   22.  Mailing Lists and Newsgroups
  2803.  
  2804.  
  2805.   22.1.  Newsgroups
  2806.  
  2807.   There is newsgroup for PostgreSQL at news.postgresql.org Please follow
  2808.   these steps to subscribe
  2809.  
  2810.  
  2811.        1. Choose Window | Netscape News
  2812.        2. Choose File | Open News Host
  2813.        3. Type news.postgresql.org in the edit box.
  2814.        4. The name of the newsgroup is comp.databases.postgresql.questions.
  2815.        To add right-click on news.postgresql.org, and choose Add Newsgroup.
  2816.        Then type the newsgroup into the edit box. The newsgroup will be added
  2817.        to the list in the left hand pane.
  2818.        5. Newsgroups will be listed in the left hand pane. Any messages in
  2819.        the selected newsgroup will appear in the right hand pane.
  2820.  
  2821.  
  2822.  
  2823.  
  2824.   22.2.  Get a Free e-mail account
  2825.  
  2826.   Check out the free deals offered - get free e-mail accounts from
  2827.  
  2828.   ╖  In Yahoo  <http://www.yahoo.com> click on e-mail
  2829.  
  2830.   ╖  In Lycos  <http://www.lycos.com> click on new e-mail accounts
  2831.  
  2832.   ╖  In hotmail  <http://www.hotmail.com> click on new e-mail accounts
  2833.  
  2834.      Subscribe to PostgreSQL mailing list and Yahoo has additional
  2835.      feature of creating a seperate folder for PostgreSQL e-mails, so
  2836.      that your regular e-mail is not cluttered. Select menu Email- >
  2837.      Options- > Filters and pick seperate folder for email.  With this
  2838.      e-mail account you can access mail from anywhere in the world as
  2839.      long as you have access to a web page.
  2840.  
  2841.   If you have any other e-mail, you can use "Mail Filters" to receive
  2842.   automatically the PostgreSQL mails into a seperate folder. This will
  2843.   avoid mail cluttering.
  2844.  
  2845.   22.3.  English Mailing List
  2846.  
  2847.   See the Mailing Lists Item on the main web page at :
  2848.  
  2849.   ╖  <http://www.postgresql.org/>
  2850.  
  2851.   ╖  Email questions to: pgsql-questions@postgresql.org
  2852.  
  2853.   ╖  Developers pgsql-hackers@postgresql.org
  2854.  
  2855.   ╖  Port specific questions pgsql-ports@postgresql.org
  2856.  
  2857.   ╖  Documentation questions pgsql-docs@postgresql.org
  2858.  
  2859.      You will get the answers/replies back by e-mail in less than a
  2860.      day!!
  2861.  
  2862.   You can also subscribe to mailing lists.  See also the section 'Get a
  2863.   Free e-mail account' above.  To subscribe or unsubscribe from the
  2864.   list, send mail to
  2865.  
  2866.   ╖  pgsql-questions-request@postgresql.org
  2867.  
  2868.   ╖  pgsql-hackers-request@postgresql.org
  2869.  
  2870.   ╖  pgsql-ports-request@postgresql.org
  2871.  
  2872.   ╖  pgsql-docs-request@postgresql.org
  2873.  
  2874.      The body of the message should contain the single line
  2875.  
  2876.   subscribe
  2877.  
  2878.   (or)
  2879.  
  2880.   unsubscribe
  2881.  
  2882.   22.4.  Archive of Mailing List
  2883.  
  2884.   Also mailing lists are archived in html format at the following
  2885.   location -
  2886.  
  2887.   ╖  Date-wise listing available via MHonarc via the WWW at
  2888.      <http://www.postgresql.org/mhonarc/pgsql-questions>
  2889.  
  2890.   ╖  <ftp://ftp.postgresql.org> directory is /pub/majordomo
  2891.  
  2892.   22.5.  Spanish Mailing List
  2893.  
  2894.   Now there is an "unofficial" list of postgreSQL in Spanish.  See also
  2895.   the section 'Free Account to Organise your PostgreSQL e-mails' above.
  2896.   To subscribe the user has to send a message to:
  2897.  
  2898.   ╖  majordomo@tlali.iztacala.unam.mx
  2899.  
  2900.      The body of the message should contain the single line:
  2901.  
  2902.   inscripcion pgsql-ayuda
  2903.  
  2904.  
  2905.   23.  Documentation and Reference Books
  2906.  
  2907.  
  2908.   23.1.  User Guides and Manuals
  2909.  
  2910.   The following are included in the PostgreSQL distribution in the
  2911.   postscript format and unix man-pages.  If you have access to internet,
  2912.   you can find the documents listed below at
  2913.   <http://www.postgresql.org/docs>
  2914.  
  2915.  
  2916.   ╖  "Installation Guide"
  2917.  
  2918.   ╖  "User Guide" for PostgreSQL
  2919.  
  2920.   ╖  "Implementation Guide" detailing database internals of PostgreSQL.
  2921.  
  2922.   ╖  Online manuals.
  2923.  
  2924.   ╖  Online manuals in HTML formats.
  2925.  
  2926.   ╖  Also manuals in Postscript format for printing hard copies.
  2927.  
  2928.   23.2.  Online Documentation
  2929.  
  2930.  
  2931.   ╖  Listing and description of default data types and operators
  2932.  
  2933.  
  2934.        Is a a part of PSQL command in the release 6.3.
  2935.  
  2936.  
  2937.  
  2938.  
  2939.   ╖  Listing of supported SQL keywords
  2940.  
  2941.  
  2942.        There is a script in the /tools directory to do that
  2943.  
  2944.  
  2945.  
  2946.  
  2947.   ╖  Listings of supported statements -
  2948.  
  2949.  
  2950.        Use the command psql \h
  2951.  
  2952.  
  2953.  
  2954.  
  2955.   ╖  Basic relational database concepts under PostgreSQL
  2956.      (implementation) and several online examples (queries) -
  2957.  
  2958.  
  2959.        Look at the regression tests at src/test. There you can find the directories
  2960.        regress/sql and suite/*.sql.
  2961.  
  2962.  
  2963.  
  2964.  
  2965.   ╖  Tutorial for PostgreSQL.
  2966.  
  2967.  
  2968.        SQL tutorial scripts is in the directory src/tutorial
  2969.  
  2970.  
  2971.   See also "SQL Tutorial for beginners" in Appendix B of this document
  2972.   ``''
  2973.  
  2974.   23.3.  Useful Reference Textbooks
  2975.  
  2976.  
  2977.   ╖  "Understanding the New SQL: A Complete Guide" - by Jim Melton and
  2978.      Alan R.Simon
  2979.  
  2980.  
  2981.        Morgan Kaufman Publisher is one of best SQL books. This deals with SQL92.
  2982.  
  2983.  
  2984.  
  2985.  
  2986.   ╖  "A Guide to THE SQL STANDARD" - by C.J.Date
  2987.  
  2988.  
  2989.        Addison-Wesley Publishing company is also a good book. Very popular book for SQL.
  2990.  
  2991.  
  2992.  
  2993.  
  2994.   ╖  SQL - The Standard Handbook,  November 1992
  2995.  
  2996.  
  2997.        Stephen Cannan and Gerard Otten
  2998.        McGraw-Hill Book Company Europe , Berkshire, SL6 2QL, England
  2999.  
  3000.  
  3001.  
  3002.  
  3003.   ╖  SQL Instant Reference, 1993
  3004.  
  3005.  
  3006.        Martin Gruber, Technical Editor: Joe Celko
  3007.        SYBEX Inc.  2021 Challenger Drive Alameda, CA 94501
  3008.  
  3009.  
  3010.  
  3011.  
  3012.   ╖  C.J.Date, "An introduction to Database Systems" (6th Edition),
  3013.      Addison-Wesley, 1995, ISBN 0-201-82458-2
  3014.  
  3015.  
  3016.        This book is the Bible of Database Management Systems.
  3017.        The book details normalization, SQL, recovery, concurrency, security,
  3018.        integrity, and extensions to the original relational model, current issues
  3019.        like client/server systems and the Object Oriented model(s). Many
  3020.        references are included for further reading. Recommended for most users.
  3021.  
  3022.  
  3023.  
  3024.  
  3025.   ╖  Stefan Stanczyk, "Theory and Practice of Relational Databases", UCL
  3026.      Press Ltd, 1990, ISBN 1-857-28232-9
  3027.  
  3028.  
  3029.        Book details theory of relational databases, relational algebra, calculus
  3030.        and normalisation. But it does not cover real world issues and examples
  3031.        beyond simple examples. Recommended for most users.
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.   ╖  "The Practical SQL Handbook" Third Edition, Addison Wesley
  3038.      Developers Press ISBN 0-201-44787-8
  3039.  
  3040.  
  3041.        Recommended for most users.
  3042.  
  3043.  
  3044.  
  3045.  
  3046.   ╖  Michael Stonebraker, "Readings in Database Systems", Morgan
  3047.      Kaufmann, 1988, ISBN 0-934613-65-6
  3048.  
  3049.  
  3050.        This book is a collection of papers that have been published over the
  3051.        years on databases. It's not for the casual user but it is really a
  3052.        reference for advanced (post-graduate) students or database system
  3053.        developers.
  3054.  
  3055.  
  3056.  
  3057.  
  3058.   ╖  C.J.Date, "Relational Database - Selected Readings", Addison-
  3059.      Wesley, 1986, ISBN 0-201-14196-5
  3060.  
  3061.  
  3062.        This book is a collection of papers that have been published over the
  3063.        years on databases. It's not for the casual user but it is really a
  3064.        reference for advanced (post-graduate) students or database system
  3065.        developers.
  3066.  
  3067.  
  3068.  
  3069.  
  3070.   ╖  Nick Ryan and Dan Smith, "Database Systems Engineering",
  3071.      International Thomson Computer Press, 1995, ISBN 1-85032-115-9
  3072.  
  3073.  
  3074.        This book goes into the details of access methods, storage techniques.
  3075.  
  3076.  
  3077.  
  3078.  
  3079.   ╖  Bipin C. Desai, "An introduction to Database Systems", West
  3080.      Publishing Co., 1990, ISBN 0-314-66771-7
  3081.  
  3082.  
  3083.        It's not for the casual user but it is for advanced (post-graduate)
  3084.        students or database system developers.
  3085.  
  3086.  
  3087.  
  3088.  
  3089.   ╖  Joe Celko "INSTANT SQL Programming"
  3090.  
  3091.  
  3092.        Wrox Press Ltd.
  3093.        Unit 16, 20 James Road, Tyseley
  3094.        Birmingham, B11 2BA, England
  3095.        1995
  3096.  
  3097.  
  3098.  
  3099.  
  3100.   ╖  Michael Gorman "Database Management Systems: Understanding and
  3101.      Applying Database"
  3102.  
  3103.   Technology
  3104.   QED and John Wiley
  3105.   1991
  3106.  
  3107.  
  3108.  
  3109.  
  3110.   ╖  Michael Gorman "Enterprise Database for a Client/Server
  3111.      Environment" QED and John Wiley
  3112.  
  3113.  
  3114.        Presents the requirements of building client/server database
  3115.        applications via repository metamodels and the use of ANSI standard SQL
  3116.        1993
  3117.  
  3118.  
  3119.  
  3120.  
  3121.   Hundreds of other titles on SQL are available! Check out a bookstore.
  3122.  
  3123.   23.4.  ANSI/ISO SQL Specifications documents  - SQL 1992, SQL 1998
  3124.  
  3125.   ANSI/ISO SQL specifications documents can be found at these sites
  3126.   listed below -
  3127.  
  3128.   ╖  <http://www.naiua.org/std-orgs.html>
  3129.  
  3130.   ╖  <http://www.ansi.org/docs> and click on file cat_c.html and search
  3131.      with "Database SQL"
  3132.  
  3133.   ╖  SQL92 standard  <http://www.jcc.com> and click on file
  3134.      sql_stnd.html
  3135.  
  3136.   ╖  ANSI/ISO SQL specifications
  3137.      <http://www.contrib.andrew.cmu.edu/~shadow/sql.html> You will find
  3138.      SQL Reference here.
  3139.  
  3140.   23.5.  Syntax of ANSI/ISO SQL 1992
  3141.  
  3142.   See Appendix A of this document ``''
  3143.  
  3144.   23.6.  Syntax of ANSI/ISO SQL 1998
  3145.  
  3146.   The SQL 1998 (SQL 3) specification is still under development.  See
  3147.   'Electronic Access to the SQL3 Working Draft' of this document at ``''
  3148.  
  3149.   23.7.  SQL Tutorial for beginners
  3150.  
  3151.   See Appendix B of this document ``''
  3152.  
  3153.   23.8.  Temporal Extension to SQL92
  3154.  
  3155.  
  3156.   ╖  Document for Temporal Extension to SQL-92
  3157.      <ftp://FTP.cs.arizona.edu/tsql/tsql2/>
  3158.  
  3159.   ╖  Temporal SQL-3 specification
  3160.      <ftp://FTP.cs.arizona.edu/tsql/tsql2/sql3/>
  3161.  
  3162.   This directory contains the language specification for a temporal
  3163.   extension to the SQL-92 language standard. This new language is
  3164.   designated TSQL2.
  3165.  
  3166.   The language specification present here is the final version of the
  3167.   language.
  3168.  
  3169.   Correspondence may be directed to the chair of the TSQL2 Language
  3170.   Design Committee, Richard T.Snodgrass, Department of Computer Science,
  3171.   University of Arizona, Tucson, AZ 85721,
  3172.  
  3173.   ╖  rts@cs.arizona.edu
  3174.  
  3175.      The affiliations and e-mail addresses of the TSQL2 Language Design
  3176.      Committee members may be found in a separate section at the end of
  3177.      the language specification.
  3178.  
  3179.   The contents of this directory are as follows.
  3180.  
  3181.   spec.dvi,.ps    TSQL2 Language Specification, published in September,
  3182.   1994
  3183.  
  3184.   bookspec.ps     TSQL2 Language Specification, as it appears in the
  3185.   TSQL2 book, published in September, 1995 (see below).
  3186.  
  3187.   sql3            change proposals submitted to the ANSI and ISO SQL3
  3188.   committees.
  3189.  
  3190.   Associated with the language specification is a collection of
  3191.   commentaries which discuss design decisions, provide examples, and
  3192.   consider how the language may be implemented. These commentaries were
  3193.   originally proposals to the TSQL2 Language Design Committee. They now
  3194.   serve a different purpose: to provide examples of the constructs,
  3195.   motivate the many decisions made during the language design, and
  3196.   compare TSQL2 with the many other language proposals that have been
  3197.   made over the last fifteen years. It should be emphasized that these
  3198.   commentaries are not part of the TSQL2 language specification per se,
  3199.   but rather supplement and elaborate upon it. The language
  3200.   specification proper is the final word on TSQL2.
  3201.  
  3202.   The commentaries, along with the language specification, several
  3203.   indexes, and other supporting material, has been published as a book:
  3204.  
  3205.   Snodgrass, R.T., editor, The TSQL2 Temporal Query Language, Kluwer
  3206.   Academic Publishers, 1995, 674+xxiv pages.
  3207.  
  3208.   The evaluation commentary appears in the book in an abbreviated form;
  3209.   the full commentary is provided in this directory as file eval.ps
  3210.  
  3211.   The file tl2tsql2.pl is a prolog program that tranlates allowed
  3212.   temporal logic to TSQL2. This program was written by Michael Boehlen
  3213.  
  3214.   ╖  boehlen@iesd.auc.dk
  3215.  
  3216.      He may be contacted for a paper that describes this translation.
  3217.      This is a rather dated version of that program. Newer versions are
  3218.      available at
  3219.  
  3220.   ╖  <http://www.cs.auc.dk/general/DBS/tdb/TimeCenter/Software>
  3221.  
  3222.      (the TimeDB and Tiger systems).
  3223.  
  3224.   23.9.  Part 0 - Acquiring ISO/ANSI SQL Documents
  3225.  
  3226.   This document shows you how to (legally) acquire a copy of the SQL-92
  3227.   standard and how to acquire a copy of the "current" SQL3 Working
  3228.   Draft.
  3229.  
  3230.   The standard is copyrighted ANSI standard by ANSI, the ISO standard by
  3231.   ISO.
  3232.  
  3233.   There are two (2) current SQL standards, an ANSI publication and an
  3234.   ISO publication. The two standards are word-for-word identical except
  3235.   for such trivial matters as the title of the document, page headers,
  3236.   the phrase "International Standard" vs "American Standard", and so
  3237.   forth.
  3238.  
  3239.   Buying the SQL-92 Standard
  3240.  
  3241.   The ISO standard, ISO/IEC 9075:1992, Information Technology - Database
  3242.   Languages - SQL, is currently (March, 1993) available and in stock
  3243.   from ANSI at:
  3244.  
  3245.  
  3246.             American National Standards Institute
  3247.             1430 Broadway
  3248.             New York, NY 10018 (USA)
  3249.             Phone (sales): +1.212.642.4900
  3250.  
  3251.  
  3252.  
  3253.  
  3254.   at a cost of US$230.00. The ANSI version, ANSI X3.135-1992, American
  3255.   National Standard for Information Systems - Database Language SQL, was
  3256.   not available from stock at this writing, but was expected to be
  3257.   available by some time between late March and early May, 1993). It is
  3258.   expected to be be priced at US$225.00.
  3259.  
  3260.   If you purchase either document from ANSI, it will have a handling
  3261.   charge of 7% added to it (that is, about US$9.10). Overseas shipping
  3262.   charges will undoubtedly add still more cost. ANSI requires a hardcopy
  3263.   of a company purchase order to accompany all orders; alternately, you
  3264.   can send a check drawn on a US bank in US dollars, which they will
  3265.   cash and clear before shipping your order. (An exception exists: If
  3266.   your organization is a corporate member of ANSI, then ANSI will ship
  3267.   the documents and simply bill your company.)
  3268.  
  3269.   The ISO standard is also available outside the United States from
  3270.   local national bodies (country standardization bodies) that are
  3271.   members of either ISO (International Organization for Standardization)
  3272.   or IEC (International Electrotechnical Commission). Copies of the list
  3273.   of national bodies and their addresses are available from ANSI or from
  3274.   other national bodies. They are also available from ISO:
  3275.  
  3276.  
  3277.             International Organization for Standardization
  3278.             Central Secretariat
  3279.             1, rue de Varembi
  3280.             CH-1211 Genhve 20
  3281.             Switzerland
  3282.  
  3283.  
  3284.  
  3285.  
  3286.   If you prefer to order the standard in a more convenient and quick
  3287.   fashion, you'll have to pay for the privilege. You can order ISO/IEC
  3288.   9075:1992, Information Technology - Database Languages - SQL, from:
  3289.  
  3290.  
  3291.             Global Engineering Documents
  3292.             2805 McGaw Ave
  3293.             Irvine, CA 92714 (USA)
  3294.             USA
  3295.             Phone (works from anywhere): +1.714.261.1455
  3296.             Phone (only in the USA): (800)854-7179
  3297.  
  3298.  
  3299.  
  3300.  
  3301.   for a cost of US$308.00. I do not know if that includes shipping or
  3302.   not, but I would guess that international shipping (at least) would
  3303.   cost extra. They will be able to ship you a document fairly quickly
  3304.   and will even accept "major credit cards". Global does not yet have
  3305.   the ANSI version nor do they have a price or an expected date (though
  3306.   I would expect it within a few weeks following the publication by ANSI
  3307.   and at a price near US$300.00).
  3308.  
  3309.   Buying a copy of the SQL3 Working Draft
  3310.  
  3311.   You can purchase a hardcopy of the SQL3 working draft from the ANSI X3
  3312.   Secretariat, CBEMA (Computer and Business Equipment Manufacturers
  3313.   Association). They intend to keep the "most recent" versions of the
  3314.   SQL3 working draft available and sell them for about US$60.00 to
  3315.   US$65.00.  You can contact CBEMA at:
  3316.  
  3317.  
  3318.             CBEMA, X3 Secretariat
  3319.             Attn: Lynn Barra
  3320.             1250 Eye St.
  3321.             Suite 200
  3322.             Washington, DC 20005 (USA)
  3323.  
  3324.  
  3325.  
  3326.  
  3327.   Lynn Barra can also be reached by telephone at +1.202.626.5738 to
  3328.   request a copy, though mail is probably more courteous.
  3329.  
  3330.   Electronic Access to the SQL3 Working Draft
  3331.  
  3332.   The most recent version (as of the date of this writing) of the SQL3
  3333.   (both ANSI and ISO) working draft (and all of its Parts) is available
  3334.   by "anonymous ftp" or by "ftpmail" on:
  3335.  
  3336.  
  3337.             gatekeeper.dec.com
  3338.  
  3339.          at
  3340.  
  3341.             /pub/standards/sql/
  3342.  
  3343.  
  3344.  
  3345.  
  3346.   In this directory are a number of files.  There are PostScript. files
  3347.   and "plain text" (not prettily formatted, but readable on a screen
  3348.   without special software).
  3349.  
  3350.   In general, you can find files with names like:
  3351.  
  3352.  
  3353.             sql-bindings-mar94.ps
  3354.             sql-bindings-mar94.txt
  3355.             sql-cli-mar94.ps
  3356.             sql-cli-mar94.txt
  3357.             sql-foundation-mar94.ps
  3358.             sql-foundation-mar94.txt
  3359.             sql-framework-mar94.ps
  3360.             sql-framework-mar94.txt
  3361.             sql-psm-mar94.ps
  3362.             sql-psm-mar94.txt
  3363.  
  3364.  
  3365.  
  3366.  
  3367.   As new versions of the documents are produced, the "mar94" will change
  3368.   to indicate the new date of publication (e.g., "aug94" is the expected
  3369.   date of the next publication after "mar94").
  3370.  
  3371.   In addition, for those readers unable to get a directory listing by
  3372.   FTP, we have placed a file with the name:
  3373.  
  3374.  
  3375.             ls
  3376.  
  3377.  
  3378.  
  3379.  
  3380.   into the same directory.  This file (surprise!) contains a directory
  3381.   listing of the directory.
  3382.  
  3383.   Retrieving Files Directly Using ftp
  3384.  
  3385.   This is a sample of how to use FTP. Specifically, it shows how to
  3386.   connect to gatekeeper.dec.com, get to the directory where the base
  3387.   document is kept, and transfer the document to your host. Note that
  3388.   your host must have Internet access to do this. The login is 'ftp' and
  3389.   the password is your email address (this is sometimes referred to as
  3390.   bits are stripped from the file(s) received. 'get' gets one file at a
  3391.   time. Comments in the script below are inside angle brackets < like so
  3392.   > .
  3393.  
  3394.  
  3395.          % ftp gatekeeper.dec.com
  3396.          Connected to gatekeeper.dec.com.
  3397.          220- *** /etc/motd.ftp ***
  3398.               Gatekeeper.DEC.COM is an unsupported service of DEC Corporate Research.
  3399.               <...this goes on for a while...>
  3400.          220 gatekeeper.dec.com FTP server (Version 5.83 Sat ... 1992) ready.
  3401.          Name (gatekeeper.dec.com:<yourlogin here>): ftp  <anonymous also works>
  3402.          331 Guest login ok, send ident as password.
  3403.          Password: <enter your email address here >
  3404.          230 Guest login ok, access restrictions apply.
  3405.          Remote system type is UNIX.  <or whatever>
  3406.          Using binary mode to transfer files.
  3407.          ftp> cd pub/standards/sql
  3408.          250 CWD command successful.
  3409.          ftp> dir
  3410.          200 PORT command successful.
  3411.          150 Opening ASCII mode data connection for /bin/ls.
  3412.          total 9529
  3413.          -r--r--r--  1 root     system     357782 Feb 25 10:18 x3h2-93-081.ps
  3414.          -r--r--r--  1 root     system     158782 Feb 25 10:19 x3h2-93-081.txt
  3415.          -r--r--r--  1 root     system     195202 Feb 25 10:20 x3h2-93-082.ps
  3416.          -r--r--r--  1 root     system      90900 Feb 25 10:20 x3h2-93-082.txt
  3417.          -r--r--r--  1 root     system    5856284 Feb 25 09:55 x3h2-93-091.ps
  3418.          -r--r--r--  1 root     system    3043687 Feb 25 09:57 x3h2-93-091.txt
  3419.          226 Transfer complete.
  3420.          ftp> type binary
  3421.          200 Type set to I.
  3422.          ftp> get x3h2-93-082.txt
  3423.          200 PORT command successful.
  3424.          150 Opening BINARY mode data connection for x3h2-93-082.txt (90900 bytes).
  3425.          226 Transfer complete.
  3426.          90900 bytes received in 0.53 seconds (166.11 Kbytes/s)
  3427.          ftp> quit
  3428.          % <the file is now in your directory as x3h2-93-082.txt>
  3429.  
  3430.  
  3431.  
  3432.  
  3433.   Retrieving Files Without Direct ftp Support
  3434.  
  3435.   Digital Equipment Corporation, like several other companies, provides
  3436.   ftp email service. The response can take several days, but it does
  3437.   provide a service equivalent to ftp for those without direct Internet
  3438.   ftp access. The address of the server is:
  3439.  
  3440.   ftpmail@decwrl.dec.com
  3441.  
  3442.   The following script will retrieve the PostScript for the latest
  3443.   version of the SQL3 document:
  3444.  
  3445.  
  3446.             reply joe.programmer@imaginary-corp.com
  3447.             connect gatekeeper.dec.com anonymous
  3448.             binary
  3449.             compress
  3450.  
  3451.  
  3452.  
  3453.  
  3454.   The following script will retrieve the PostScript for the latest ver¡
  3455.   sion of the SQL3 document:
  3456.  
  3457.  
  3458.             reply joe.programmer@imaginary-corp.com
  3459.             connect gatekeeper.dec.com anonymous
  3460.             binary
  3461.             compress
  3462.             uuencode
  3463.             chdir /pub/standards/sql
  3464.             get x3h2-93-091.ps
  3465.             quit
  3466.  
  3467.  
  3468.  
  3469.  
  3470.   The first line in the script commands the server to return the
  3471.   requested files to you; you should replace "joe.programmer@imaginary-
  3472.   corp.com" with your Internet address. The file in this example,
  3473.   x3h2-93-091.ps, is returned in "compress"ed "uuencode"d format as 34
  3474.   separate email messages. If your environment does not provide tools
  3475.   for reconstructing such files, then you could retrieve the file as
  3476.   plain text with the following script:
  3477.  
  3478.  
  3479.             reply joe.programmer@imaginary-corp.com
  3480.             connect gatekeeper.dec.com anonymous
  3481.             chdir /pub/standards/sql
  3482.             get x3h2-93-091.ps
  3483.             quit
  3484.  
  3485.  
  3486.  
  3487.  
  3488.   But be warned, the .ps file will probably be sent to you in more than
  3489.   70 parts!
  3490.  
  3491.   To retrieve any particular file, other than x3h2-93-091.ps, simply
  3492.   replace "x3h2-93-091.ps" with the name of the desired file. To get a
  3493.   directory listing of all files available, replace "get x3h2-93-091.ps"
  3494.   with "dir".
  3495.  
  3496.  
  3497.  
  3498.  
  3499.   23.10.  Part 1 - ISO/ANSI SQL Current Status
  3500.  
  3501.   This chapter is a source of information about the SQL standards
  3502.   process and its current state.
  3503.  
  3504.   Current Status:
  3505.  
  3506.   Development is currently underway to enhance SQL into a
  3507.   computationally complete language for the definition and management of
  3508.   persistent, complex objects. This includes: generalization and
  3509.   specialization hierarchies, multiple inheritance, user defined data
  3510.   types, triggers and assertions, support for knowledge based systems,
  3511.   recursive query expressions, and additional data administration tools.
  3512.   It also includes the specification of abstract data types (ADTs),
  3513.   object identifiers, methods, inheritance, polymorphism, encapsulation,
  3514.   and all of the other facilities normally associated with object data
  3515.   management.
  3516.  
  3517.   In the fall of 1996, several parts of SQL3 went through a ISO CD
  3518.   ballot.  Those parts were SQL/Framework, SQL/Foundation, and
  3519.   SQL/Bindings. Those ballots failed (as expected) with 900 or so
  3520.   comments. In Late January, there was an ISO DBL editing meeting that
  3521.   processed a large number of problem solutions that were either
  3522.   included with ballot comments or submitted as separate papers. Since
  3523.   the DBL editing meeting was unable to process all of the comments, the
  3524.   editing meeting has been extended. The completion of the editing
  3525.   meeting is scheduled for the end of July, 1997, in London.
  3526.  
  3527.   Following the July editing meeting, the expectation is that a Final CD
  3528.   ballot will be requested for these parts of SQL. The Final CD process
  3529.   will take about 6 months and a DBL editing meeting, after which there
  3530.   will be a DIS ballot and a fairly quick IS ballot.
  3531.  
  3532.   The ISO procedures have changed since SQL/92, so the SQL committees
  3533.   are still working through the exact details of the process.
  3534.  
  3535.   If everything goes well, these parts of SQL3 will become an official
  3536.   ISO/IEC standard in late 1998, but the schedule is very tight.
  3537.  
  3538.   In 1993, the ANSI and ISO development committees decided to split
  3539.   future SQL development into a multi-part standard. The Parts are:
  3540.  
  3541.  
  3542.   ╖  Part 1: Framework A non-technical description of how the document
  3543.      is structured.
  3544.  
  3545.   ╖  Part 2: Foundation The core specification, including all of the new
  3546.      ADT features.
  3547.  
  3548.   ╖  Part 3: SQL/CLI The Call Level Interface.
  3549.  
  3550.   ╖  Part 4: SQL/PSM The stored procedures specification, including
  3551.      computational completeness.
  3552.  
  3553.   ╖  Part 5: SQL/Bindings The Dynamic SQL and Embedded SQL bindings
  3554.      taken from SQL-92.
  3555.  
  3556.   ╖  Part 6: SQL/XA An SQL specialization of the popular XA Interface
  3557.      developed by X/Open
  3558.  
  3559.   ╖  Part 7:SQL/TemporalAdds time related capabilities to the SQL
  3560.      standards.
  3561.  
  3562.   In the USA, the entirety of SQL3 is being processed as both an ANSI
  3563.   Domestic ("D") project and as an ISO project. The expected time frame
  3564.   for completion of SQL3 is currently 1999.
  3565.   The SQL/CLI and SQL/PSM are being processed as fast as possible as
  3566.   addendums to SQL-92. In the USA, these are being processed only as
  3567.   International ("I") projects. SQL/CLI was completed in 1995. SQL/PSM
  3568.   should be completed sometime in late 1996.
  3569.  
  3570.   In addition to the SQL3 work, a number of additional projects are
  3571.   being persued:
  3572.  
  3573.  
  3574.   ╖  SQL/MM An ongoing effort to define standard multi-media packages
  3575.      using the SQL3 ADT capabilities.
  3576.  
  3577.   ╖  Remote Data Access (RDA)
  3578.  
  3579.   Standards Committee and Process
  3580.  
  3581.   There are actually a number of SQL standards committees around the
  3582.   world.  There is an international SQL standards group as a part of
  3583.   ISO. A number of countries have committees that focus on SQL. These
  3584.   countries (usually) send representatives to ISO/IEC JTC1/SC 21/WG3 DBL
  3585.   meetings. The countries that actively participate in the ISO SQL
  3586.   standards process are:
  3587.  
  3588.  
  3589.   ╖  Australia
  3590.  
  3591.   ╖  Brazil
  3592.  
  3593.   ╖  Canada
  3594.  
  3595.   ╖  France
  3596.  
  3597.   ╖  Germany
  3598.  
  3599.   ╖  Japan
  3600.  
  3601.   ╖  Korea
  3602.  
  3603.   ╖  The Netherlands
  3604.  
  3605.   ╖  United Kingdom
  3606.  
  3607.   ╖  United States
  3608.  
  3609.   NIST Validation
  3610.  
  3611.   SQL implementations are validated (in the Unites States) by the
  3612.   National Institute of Standards and Testing (NIST). NIST currently has
  3613.   a validation test suite for entry level SQL-92. The exact details of
  3614.   the NIST validation requirements are defined as a Federal Information
  3615.   Processing Standard (FIPS). The current requirements for SQL are
  3616.   defined in FIPS 127-2. The Postscript and Text versions of this
  3617.   document can be retrieved from NIST.  The current SQL Validated
  3618.   Products List can also be retrieved from NIST.
  3619.  
  3620.   Standard SQL Publications and Articles
  3621.  
  3622.   There are two versions of the SQL standard. Both are available from
  3623.   ANSI:
  3624.  
  3625.  
  3626.   ╖  ISO/IEC 9075:1992, "Information Technology --- Database Languages
  3627.      --- SQL"
  3628.  
  3629.   ╖  ANSI X3.135-1992, "Database Language SQL"
  3630.  
  3631.   The two versions of the SQL standard are identical except for the
  3632.   front matter and references to other standards. Both versions are
  3633.   available from:
  3634.  
  3635.  
  3636.             American National Standards Institute
  3637.             1430 Broadway
  3638.             New York, NY 10018
  3639.             USA
  3640.             Phone (sales): +1.212.642.4900
  3641.  
  3642.  
  3643.  
  3644.  
  3645.   In additon to the SQL-92 standard, there is now a Technical Corrigen¡
  3646.   dum (bug fixes):
  3647.  
  3648.  
  3649.           * Technical Corrigendum 1:1994 to ISO/IEC 9075:1992
  3650.  
  3651.  
  3652.  
  3653.  
  3654.   TC 1 should also be available from ANSI. There is only an ISO version
  3655.   of TC 1 -- it applies both to the ISO and ANSI versions of SQL-92.
  3656.  
  3657.   In addition to the standards, several books have been written about
  3658.   the 1992 SQL standard. These books provide a much more readable
  3659.   description of the standard than the actual standard.
  3660.  
  3661.   Related Standards
  3662.  
  3663.   A number of other standards are of interest to the SQL community. This
  3664.   section contains pointers to information on those efforts. These
  3665.   pointers will be augmented as additional information becomes available
  3666.   on the web.
  3667.  
  3668.  
  3669.   ╖  SQL Environments (FIPS 193)
  3670.  
  3671.   ╖  Next Generation Repository Systems (X3H4) - a News Release calling
  3672.      for particpation in "Developing Standards for the Next Generation
  3673.      Repository Systems."
  3674.  
  3675.   23.11.  Part 2 - ISO/ANSI SQL Foundation
  3676.  
  3677.   A significant portion of the SQL3 effort is in the SQL Foundation
  3678.   document:
  3679.  
  3680.  
  3681.   ╖  Base SQL/PSM capabilities (moved form SQL/PSM-92)
  3682.  
  3683.   ╖  New data types
  3684.  
  3685.   ╖  Triggers
  3686.  
  3687.   ╖  Subtables
  3688.  
  3689.   ╖  Abstract Data Types (ADT)
  3690.  
  3691.   ╖  Object Oriented Capabilities
  3692.  
  3693.   There are several prerequisites to the object oriented capabilities:
  3694.  
  3695.  
  3696.  
  3697.   ╖  Capability of defining complex operations
  3698.  
  3699.   ╖  Store complex operations in the database
  3700.  
  3701.   ╖  External procedure calls ¡ Some operations may not be in SQL, or
  3702.      may require external interactions
  3703.  
  3704.   These capabilities are defined as a part of SQL/PSM
  3705.  
  3706.   A great deal of work is currently being done to refine the SQL-3
  3707.   object model and align it with the object model proposed by ODMG. This
  3708.   effort is described in the X3H2 and ISO DBL paper: Accomodating SQL3
  3709.   and ODMG. A recent update on the SQL3/OQL Merger is also available.
  3710.  
  3711.   SQL3 Timing
  3712.  
  3713.   Work on SQL3 is well underway, but the final standards is several
  3714.   years away.
  3715.  
  3716.  
  3717.   ╖  International ballot to progress SQL3 Foundation from Working Draft
  3718.      to Committee Draft (CD) taking place fall, 1996.
  3719.  
  3720.   ╖  Ballot is expected to generate numerous comments
  3721.  
  3722.   ╖  A second CD ballot is likely to be required
  3723.  
  3724.   ╖  Draft International Standard ballot is likely to be take place in
  3725.      mid 1998
  3726.  
  3727.   ╖  International Standard could be completed by mid 1999.
  3728.  
  3729.   The ANSI version of the standard will be on a similar schedule.
  3730.  
  3731.   23.12.  Part 3 - ISO/ANSI SQL Call Level Interface
  3732.  
  3733.   The SQL/CLI is a programing call level interface to SQL databases. It
  3734.   is designed to support database access from shrink-wrapped
  3735.   applications. The CLI was originally created by a subcommittee of the
  3736.   SQL Access Group (SAG).  The SAG/CLI specification was published as
  3737.   the Microsoft Open DataBase Connectivity (ODBC) specification in 1992.
  3738.   In 1993, SAG submitted the CLI to the ANSI and ISO SQL committees.
  3739.   (The SQL Access Group has now merged with X/Open consortium.)
  3740.  
  3741.   SQL/CLI provides an international standard for:
  3742.  
  3743.  
  3744.   ╖  Implementation-independent CLI to access SQL databases
  3745.  
  3746.   ╖  Client-server tools can easily access database through dynamic Link
  3747.      Libraries
  3748.  
  3749.   ╖  Supports and encourages rich set of Client-server tools
  3750.  
  3751.   SQL/CLI Timing
  3752.  
  3753.   For the standards process, SQL/CLI is being processed with blinding
  3754.   speed.
  3755.  
  3756.  
  3757.   ╖  SQL/CLI is an addendum to 1992 SQL standard (SQL-92)
  3758.  
  3759.   ╖  Completed as an ISO standard in 1995
  3760.  
  3761.   ╖  ISO/IEC 9075-3:1995 Information technology -- Database languages --
  3762.      SQL -- Part 3: Call-Level Interface (SQL/CLI)
  3763.   ╖  Current SQL/CLI effort is adding support for SQL3 features
  3764.  
  3765.   23.13.  Part 4 - ISO/ANSI SQL Persistent Stored Modules
  3766.  
  3767.   SQL/PSM expands SQL by adding:
  3768.  
  3769.  
  3770.   ╖  Procedural language extensions
  3771.  
  3772.   ╖  Multi-statement and Stored Procedures
  3773.  
  3774.   ╖  External function and procedure calls
  3775.  
  3776.   In addition to being a valuable application development tool, SQL/PSM
  3777.   provides the foundation support for the object oriented capabilities
  3778.   in SQL3.
  3779.  
  3780.   Multi-statement and Stored Procedures
  3781.  
  3782.   Multi-statement and stored procedures offer a variety of advantages in
  3783.   a client/server environment:
  3784.  
  3785.  
  3786.   ╖  Performance - Since a stored procedure can perform multiple SQL
  3787.      statements, network interaction with the client are reduced.
  3788.  
  3789.   ╖  Security - A user can be given the right to call a stored procedure
  3790.      that updates a table or set of tables but denied the right to
  3791.      update the tables directly
  3792.  
  3793.   ╖  Shared code - The code in a stored procedure does not have to be
  3794.      rewritten and retested for each client tool that accesses the
  3795.      database.
  3796.  
  3797.   ╖  Control - Provides a single point of definition and control for
  3798.      application logic.
  3799.  
  3800.   Procedural Language Extensions
  3801.  
  3802.   Procedural language add the power of a traditional programming
  3803.   language to SQL through flow control statements and a variety of other
  3804.   programming constructs.
  3805.  
  3806.   Flow Control Statements
  3807.  
  3808.  
  3809.   ╖  If-then-else
  3810.  
  3811.   ╖  Looping constructs
  3812.  
  3813.   ╖  Exception handling
  3814.  
  3815.   ╖  Case statement
  3816.  
  3817.   ╖  Begin-End blocks
  3818.  
  3819.   The procedural language extensions include other programming language
  3820.   constructs:
  3821.  
  3822.  
  3823.   ╖  Variable declarations
  3824.  
  3825.   ╖  Set statements for value assignment
  3826.  
  3827.   ╖  Get diagnostics for process and status information
  3828.  
  3829.   In addition, all of the traditional SQL statements can be included in
  3830.   multi-statement procedures.
  3831.  
  3832.   External Procedure and Function Calls
  3833.  
  3834.   One feature frequently mentioned in the wish lists for many database
  3835.   products, and implemented in some, is a capability augmenting the
  3836.   built-in features with calls to user-written procedures external to
  3837.   the database software.
  3838.  
  3839.  
  3840.   ╖  Allows a particular site or application to add their own database
  3841.      functions
  3842.  
  3843.   ╖  Can be used throughout the database applications
  3844.  
  3845.   The benefit of this capability is that it gives the database (and
  3846.   therefore database applications) access to a rich set of procedures
  3847.   and functions too numerous to be defined by a standards committee.
  3848.  
  3849.   SQL/PSM Timing
  3850.  
  3851.   SQL/PSM is proceeding quickly:
  3852.  
  3853.  
  3854.   ╖  SQL/PSM is an addendum to SQL-92
  3855.  
  3856.   ╖  International ballot to progress SQL/PSM from a Draft International
  3857.      Standard to an International Standard ended January, 1996.
  3858.  
  3859.   ╖  Editing meeting in May, 1996 did not resolve all of the comments
  3860.  
  3861.   ╖  Continuation of PSM Editing meeting is scheduled for September 30
  3862.      through October 4, 1996
  3863.  
  3864.   ╖  The schedule is tight but there is a chance that PSM will be
  3865.      published with a 1996 date.
  3866.  
  3867.   ╖  The official designation will be: ISO/IEC DIS 9075-4:199?
  3868.      Information technology -- Database languages -- SQL -- Part 4: SQL
  3869.      Persistent Stored Modules (SQL/PSM)
  3870.  
  3871.   ╖  Work is well underway on adding SQL/PSM support for SQL3 features.
  3872.  
  3873.   23.14.  Part 5 - ISO/ANSI SQL/Bindings
  3874.  
  3875.   For ease of reference, the programming language bindings have been
  3876.   pulled out into a separate document. The current version is simply an
  3877.   extract of the dynamic and embedded bindings from SQL-92.
  3878.  
  3879.   A variety of issues remain unresolved for the programming language
  3880.   bindings.
  3881.  
  3882.   For traditional programming language, mappings exist for the SQL-92
  3883.   datatypes. However, mappings must be defined between SQL objects and
  3884.   programming language variables.
  3885.  
  3886.   For object oriented languages, mapping must be defined for the current
  3887.   SQL datatypes and between the SQL object model and the object model of
  3888.   the object-oriented language.
  3889.  
  3890.   The object model needs to stabilize before these can be addressed.
  3891.  
  3892.   The language bindings will be completed as a part of SQL3.
  3893.  
  3894.  
  3895.   23.15.  Part 6 - ISO/ANSI SQL XA Interface Specialization (SQL/XA)
  3896.  
  3897.   This specification would standardize an application program interface
  3898.   (API) between a global Transaction Manager and an SQL Resource
  3899.   Manager. It would standardize the function calls, based upon the
  3900.   semantics of ISO/IEC 10026, "Distributed Transaction Processing", that
  3901.   an SQL Resource Manager would have to support for two-phase commit.
  3902.   The base document is derived from an X/Open publication, with X/Open
  3903.   permission, that specifies explicit input and output parameters and
  3904.   semantics, in terms of SQL data types, for the following functions:
  3905.   xa_close, xa_commit, xa_complete, xa_end, xa_forget, xa_open,
  3906.   xa_prepare, xa_recover, xa_rollback, and xa_start.
  3907.  
  3908.   ISO is currently attempting to fast-track the X/Open XA specification.
  3909.   The fast-track process adopts a current industry specification with no
  3910.   changes.  The XA fast-track ballot at the ISO SC21, JTC 1 level
  3911.   started on April 27, 1995 and ends on October 27, 1995. If the XA
  3912.   specification is approved by 75% of the votes, and by 2/3 of the p-
  3913.   members of JTC 1, it will become an International Standard. If the
  3914.   fast-track ballot is approved, SQL/XA could become a standard in 1996.
  3915.  
  3916.   23.16.  Part 7 - ISO/ANSI SQL Temporal
  3917.  
  3918.   Temporal SQL deals with time-related data. The concept is that it is
  3919.   useful to query data to discover what it looked like at a particular
  3920.   point in time.  Temporal SQL is a December, 1994 paper by Rick
  3921.   Snodgrass describing the concepts.
  3922.  
  3923.   X3 Announces the Approval of a New Project, ISO/IEC 9075 Part 7:
  3924.   SQL/Temporal is a press release related to SQL/Temporal.
  3925.  
  3926.  
  3927.        ----------------------------------------------------------------------------
  3928.                                        Temporal SQL
  3929.                                        ************
  3930.        Rick Snodgrass (chair of the TSQL2 committee)
  3931.        31-Dec-1994
  3932.  
  3933.  
  3934.  
  3935.  
  3936.   Several people have questioned the need for additional support for
  3937.   time in SQL3 (as proposed by DBL RIO-75, requesting a new part of SQL
  3938.   to support temporal databases). The claim is that abstract data types
  3939.   (ADT's) are sufficient for temporal support. In this informational
  3940.   item, I argue, using concrete examples, that using columns typed with
  3941.   abstract data types is inadequate for temporal queries. In particular,
  3942.   many common temporal queries are either difficult to simulate in SQL,
  3943.   or require embedding SQL in a procedural language. Alternatives are
  3944.   expressed in TSQL2, a temporal extension to SQL-92.
  3945.  
  3946.   23.16.1.  INTRODUCTION
  3947.  
  3948.   Valid-time support goes beyond that of a temporal ADT. With the later,
  3949.   a column is specified as of a temporal domain, such as DATE or
  3950.   INTERVAL (examples will be given shortly). With valid time, the rows
  3951.   of a table vary over time, as reality changes. The timestamp
  3952.   associated with a row of a valid-time table is interpreted by the
  3953.   query language as the time when the combination of values of the
  3954.   columns in the row was valid. This implicit timestamp allows queries
  3955.   to be expressed succinctly and intuitively.
  3956.  
  3957.   23.16.2.  A CASE STUDY - STORING CURRENT INFORMATION
  3958.  
  3959.   The University of Arizona's Office of Appointed Personnel has some
  3960.   information in a database, including each employee's name, their
  3961.   current salary, and their current title. This can be represented by a
  3962.   simple table.
  3963.  
  3964.  
  3965.                Employee(Name, Salary, Title)
  3966.  
  3967.  
  3968.  
  3969.  
  3970.   Given this table, finding an employee's salary is easy.
  3971.  
  3972.  
  3973.                SELECT Salary
  3974.                FROM Employee
  3975.                WHERE Name = 'Bob'
  3976.  
  3977.  
  3978.  
  3979.  
  3980.   Now the OAP wishes to record the date of birth. To do so, a column is
  3981.   added to the table, yielding the following schema.
  3982.  
  3983.  
  3984.                Employee(Name, Salary, Title, DateofBirth DATE)
  3985.  
  3986.  
  3987.  
  3988.  
  3989.   Finding the employee's date of birth is analogous to determining the
  3990.   salary.
  3991.  
  3992.  
  3993.                SELECT DateofBirth
  3994.                FROM Employee
  3995.                WHERE Name = 'Bob'
  3996.  
  3997.  
  3998.  
  3999.  
  4000.   23.16.3.  A CASE STUDY - STORING HISTORY INFORMATION
  4001.  
  4002.   The OAP wishes to computerize the employment history. To do so, they
  4003.   append two columns, one indicating when the information in the row
  4004.   became valid, the other indicating when the information was no longer
  4005.   valid.
  4006.  
  4007.   Employee (Name, Salary, Title, DateofBirth, Start DATE, Stop DATE)
  4008.  
  4009.   To the data model, these new columns are identical to DateofBirth.
  4010.   However, their presence has wide-ranging consequences.
  4011.  
  4012.   23.16.4.  A CASE STUDY - PROJECTION
  4013.  
  4014.   To find an employee's current salary, things are more difficult.
  4015.  
  4016.  
  4017.                SELECT Salary
  4018.                FROM Employee
  4019.                WHERE Name = 'Bob' AND Start <= CURRENT_DATE AND CURRENT_DATE <= Stop
  4020.  
  4021.  
  4022.  
  4023.  
  4024.   This query is more complicated than the previous one. The culprit is
  4025.   obviously the two new columns. The OAP wants to distribute to each
  4026.   employee their salary history. Specifically, for each person, the
  4027.   maximal intervals at each salary needs to be determined. Unfortu¡
  4028.   nately, this is not possible in SQL. An employee could have arbitrar¡
  4029.   ily many title changes between salary changes.
  4030.  
  4031.  
  4032.        Name    Salary  Title             DateofBirth   Start           Stop
  4033.        ----    ------  -----             -----------   -----           ----
  4034.        Bob     60000   Assistant Provost 1945-04-09    1993-01-01      1993-05-30
  4035.        Bob     70000   Assistant Provost 1945-04-09    1993-06-01      1993-09-30
  4036.        Bob     70000   Provost           1945-04-09    1993-10-01      1994-01-31
  4037.        Bob     70000   Professor         1945-04-09    1994-02-01      1994-12-31
  4038.  
  4039.                                       Figure 1
  4040.  
  4041.  
  4042.  
  4043.  
  4044.   Note that there are three rows in which Bob's salary remained constant
  4045.   at $70,000. Hence, the result should be two rows for Bob.
  4046.  
  4047.  
  4048.        Name    Salary  Start           Stop
  4049.        ----    ------  -----           ----
  4050.        Bob     60000   1993-01-01      1993-05-30
  4051.        Bob     70000   1993-06-01      1994-12-31
  4052.  
  4053.  
  4054.  
  4055.  
  4056.   One alternative is to give the user a printout of Salary and Title
  4057.   information, and have user determine when his/her salary changed. This
  4058.   alternative is not very appealing or realistic. A second alternative
  4059.   is to use SQL as much as possible.
  4060.  
  4061.  
  4062.        CREATE TABLE Temp(Salary, Start, Stop)
  4063.        AS      SELECT Salary, Start, Stop
  4064.                FROM Employee;
  4065.  
  4066.  
  4067.  
  4068.  
  4069.   repeat
  4070.  
  4071.  
  4072.                UPDATE Temp T1
  4073.                SET (T1.Stop) = (SELECT MAX(T2.Stop)
  4074.                                 FROM Temp AS T2
  4075.                                 WHERE T1.Salary = T2.Salary AND T1.Start < T2.Start
  4076.                                        AND T1.Stop >= T2.Start AND T1.Stop < T2.Stop)
  4077.                WHERE EXISTS (SELECT *
  4078.                              FROM Temp AS T2
  4079.                              WHERE T1.Salary = T2.Salary AND T1.Start < T2.Start
  4080.                                        AND T1.Stop >= T2.Start AND T1.Stop < T2.Stop)
  4081.                until no rows updated;
  4082.  
  4083.        DELETE FROM Temp T1
  4084.  
  4085.        WHERE EXISTS (SELECT *
  4086.                      FROM Temp AS T2
  4087.                      WHERE T1.Salary = T2.Salary
  4088.                                AND ((T1.Start > T2.Start AND T1.Stop <= T2.Stop)
  4089.                                OR (T1.Start >= T2.Start AND T1.Stop < T2.Stop))
  4090.  
  4091.  
  4092.  
  4093.   The loop finds those intervals that overlap or are adjacent and thus
  4094.   should be merged. The loop is executed log N times in the worst case,
  4095.   where N is the number of rows in a chain of overlapping or adjacent
  4096.   value-equivalent rows. The reader can simulate the query on the exam¡
  4097.   ple table to convince him/herself of its correctness.
  4098.  
  4099.   A third alternative is to use SQL only to open a cursor on the table.
  4100.   A linked list of periods is maintained, each with a salary. This
  4101.   linked list should be initialized to empty.
  4102.  
  4103.  
  4104.        DECLARE emp_cursor CURSOR FOR
  4105.                SELECT Salary, Title, Start, Stop
  4106.                FROM Employee;
  4107.        OPEN emp_cursor;
  4108.        loop:
  4109.                FETCH emp_cursor INTO :salary, :start, :stop;
  4110.                if no-data returned then goto finished;
  4111.                find position in linked list to insert this information;
  4112.                goto loop;
  4113.        finished:
  4114.        CLOSE emp_cursor;
  4115.  
  4116.  
  4117.  
  4118.  
  4119.   iterate through linked list, printing out dates and salaries
  4120.  
  4121.   The linked list may not be necessary in this case if the cursor is
  4122.   ORDER BY Start.
  4123.  
  4124.   In any case, the query, a natural one, is quite difficult to express
  4125.   using the facilities present in SQL-92. The query is trivial in TSQL2.
  4126.  
  4127.  
  4128.                SELECT Salary
  4129.                FROM Employee
  4130.  
  4131.  
  4132.  
  4133.  
  4134.   23.16.5.  A CASE STUDY - JOIN
  4135.  
  4136.   A more drastic approach is to avoid the problem of extracting the
  4137.   salary history by reorganizing the schema to separate salary, title,
  4138.   and date of birth information (in the following, we ignore the date of
  4139.   birth, for simplicity).
  4140.  
  4141.  
  4142.                Employee1 (Name, Salary, Start DATE, Stop DATE)
  4143.                Employee2 (Name, Title, Start DATE, Stop DATE)
  4144.  
  4145.  
  4146.  
  4147.  
  4148.   The Employee1 table is as follows.
  4149.  
  4150.  
  4151.        Name    Salary  Start           Stop
  4152.        ----    ------  -----           ----
  4153.        Bob     60000   1993-01-01      1993-05-30
  4154.        Bob     70000   1993-06-01      1993-12-31
  4155.  
  4156.  
  4157.  
  4158.  
  4159.   Here is the example Employee2 table.
  4160.  
  4161.  
  4162.        Name    Title                   Start           Stop
  4163.        ----    ------                  -----           ----
  4164.        Bob     Assistant Provost       1993-01-01      1993-09-30
  4165.        Bob     Provost                 1993-10-01      1994-01-31
  4166.        Bob     Professor               1994-02-01      1994-12-31
  4167.  
  4168.  
  4169.  
  4170.  
  4171.   With this change, getting the salary information for an employee is
  4172.   now easy.
  4173.  
  4174.  
  4175.                SELECT Salary, Start, Stop
  4176.                FROM Employee1
  4177.                WHERE Name = 'Bob'
  4178.  
  4179.  
  4180.  
  4181.  
  4182.   But what if the OAP wants a table of salary, title intervals (that is,
  4183.   suppose the OAP wishes a table to be computed in the form of Figure
  4184.   1)? One alternative is to print out two tables, and let the user fig¡
  4185.   ure out the combinations. A second alternative is to use SQL entirely.
  4186.   Unfortunately, this query must do a case analysis of how each row of
  4187.   Employee1 overlaps each row of Employee2; there are four possible
  4188.   cases.
  4189.  
  4190.  
  4191.        SELECT Employee1.Name, Salary, Dept, Employee1.Start, Employee1.Stop
  4192.        FROM Employee1, Employee2
  4193.        WHERE Employee1.Name = Employee2.Name
  4194.             AND Employee2.Start <= Employee1.Start AND Employee1.Stop < Employee2.Stop
  4195.        UNION
  4196.        SELECT Employee1.Name, Salary, Dept, Employee1.Start, Employee2.Stop
  4197.        FROM Employee1, Employee2
  4198.        WHERE Employee1.Name = Employee2.Name
  4199.             AND Employee1.Start >= Employee2.Start AND Employee2.Stop < Employee1.Stop
  4200.                AND Employee1.Start < Employee2.Stop
  4201.        UNION
  4202.        SELECT Employee1.Name, Salary, Dept, Employee2.Start, Employee1.Stop
  4203.        FROM Employee1, Employee2
  4204.        WHERE Employee1.Name = Employee2.Name
  4205.             AND Employee2.Start > Employee1.Start AND Employee1.Stop < Employee2.Stop
  4206.                AND Employee2.Start < Employee1.Stop
  4207.        UNION
  4208.        SELECT Employee1.Name, Salary, Dept, Employee2.Start, Employee2.Stop
  4209.        FROM Employee1, Employee2
  4210.        WHERE Employee1.Name = Employee2.Name
  4211.             AND Employee2.Start > Employee1.Start AND Employee2.Stop < Employee1.Stop
  4212.  
  4213.  
  4214.  
  4215.  
  4216.   Getting all the cases right is a challenging task. In TSQL2, perform¡
  4217.   ing a temporal join is just what one would expect.
  4218.  
  4219.  
  4220.                SELECT Employee1.Name, Salary, Dept
  4221.                FROM Employee1, Employee2
  4222.                WHERE Employee1.Name = Employee2.Name
  4223.  
  4224.  
  4225.   23.16.6.  A CASE STUDY - AGGREGATES
  4226.  
  4227.   Now the OAP is asked, what is the maximum salary? Before adding time,
  4228.   this was easy.
  4229.  
  4230.  
  4231.                SELECT MAX(Salary)
  4232.                FROM Employee
  4233.  
  4234.  
  4235.  
  4236.  
  4237.   Now that the salary history is stored, we'd like a history of the max¡
  4238.   imum salary over time. The problem, of course, is that SQL does not
  4239.   provide temporal aggregates. The easy way to do this is to print out
  4240.   the information, and scan manually for the maximums. An alternative is
  4241.   to be tricky and convert the snapshot aggregate query into a non-
  4242.   aggregate query, then convert that into a temporal query. The non-
  4243.   aggregate query finds those salaries for which a greater salary does
  4244.   not exist.
  4245.  
  4246.  
  4247.                SELECT Salary
  4248.                FROM Employee AS E1
  4249.                WHERE NOT EXISTS (SELECT *
  4250.                                  FROM Employee AS E2
  4251.                                  WHERE E2.Salary > E1.Salary)
  4252.  
  4253.  
  4254.  
  4255.  
  4256.   Converting this query into a temporal query is far from obvious. The
  4257.   following is one approach.
  4258.  
  4259.  
  4260.        CREATE TABLE Temp (Salary, Start, Stop)
  4261.        AS      SELECT Salary, Start, Stop
  4262.                FROM Employee;
  4263.        INSERT INTO Temp
  4264.                SELECT T.Salary, T.Start, E.Start
  4265.                FROM Temp AS T, Employee AS E
  4266.                WHERE E.Start >= T.Start AND E.Start < T.Stop AND E.Salary > T.Salary;
  4267.  
  4268.        INSERT INTO Temp
  4269.                SELECT T.Salary, T.Stop, E.Stop
  4270.                FROM Temp AS T, Employee AS E
  4271.                WHERE E.Stop > T.Start AND E.Stop <= T.Stop AND E.Salary > T.Salary;
  4272.        DELETE FROM Temp T
  4273.        WHERE EXISTS (SELECT *
  4274.                      FROM Employee AS E
  4275.                      WHERE ((T.Start => E.Start AND T.Start < E.Stop)
  4276.                                OR (E.Start >= T.Start AND E.Start < T.Stop))
  4277.                            AND E.Salary > T.Salary;
  4278.  
  4279.  
  4280.  
  4281.  
  4282.   This approach creates an auxiliary table. We add to this table the
  4283.   lower period of a period subtraction and the upper period of a period
  4284.   subtraction.  We then delete all periods that overlap with some row
  4285.   defined by the subquery, thereby effecting the NOT EXISTS. Finally we
  4286.   generate from the auxiliary table maximal periods, in the same way
  4287.   that the salary information was computed above. As one might imagine,
  4288.   such SQL code is extremely inefficient to execute, given the complex
  4289.   nested queries with inequality predicates.
  4290.  
  4291.   A third alternative is to use SQL as little as possible, and instead
  4292.   compute the desired maximum history in a host language using cursors.
  4293.  
  4294.   The query in TSQL2 is again straightforward and intuitive.
  4295.  
  4296.  
  4297.                SELECT MAX(Salary)
  4298.                FROM Employee
  4299.  
  4300.  
  4301.  
  4302.  
  4303.   23.16.7.  SUMMARY
  4304.  
  4305.   Time-varying data is manipulated in most database applications. Valid-
  4306.   time support is absent in SQL. Many common temporal queries are either
  4307.   difficult to simulate in SQL, or require embedding SQL in a procedural
  4308.   language, due to SQL's lack of support for valid-time tables in its
  4309.   data model and query constructs.
  4310.  
  4311.   Elsewhere, we showed that adding valid-time support requires few
  4312.   changes to the DBMS implementation, can dramatically simplify some
  4313.   queries and enable others, and can later enable optimizations in
  4314.   storage structures, indexing methods, and optimization strategies that
  4315.   can yield significant performance improvements.
  4316.  
  4317.   With a new part of SQL3 supporting time-varying information, we can
  4318.   begin to address such applications, enabling SQL3 to better manage
  4319.   temporal data.
  4320.  
  4321.  
  4322.        ----------------------------------------------------------------------------
  4323.                   Accredited Standards Committee* X3, Information Technology
  4324.        NEWS RELEASE
  4325.  
  4326.        Doc. No.:       PR/96-0002
  4327.  
  4328.        Reply to:       Barbara Bennett at bbennett@itic.nw.dc.us
  4329.  
  4330.                     X3 Announces the Approval of a New Project, ISO/IEC
  4331.  
  4332.                                 9075 Part 7:  SQL/Temporal
  4333.  
  4334.        Washington D.C., January 1996
  4335.        ----------------------------------------------------------------------------
  4336.  
  4337.  
  4338.  
  4339.  
  4340.   -- Accredited Standards Committee X3, Information Technology is
  4341.   announcing the approval of a new project on SQL/Temporal Support,
  4342.   ISO/IEC 9075 Part 7, with the work being done in Technical Committee
  4343.   X3H2, Database.  The scope of this proposed standard specifies a new
  4344.   Part of the emerging SQL3 standard, e.g., Part 7, Temporal SQL, to be
  4345.   extensions to the SQL language supporting storage, retrieval, and
  4346.   manipulation of temporal data in an SQL database environment.  The
  4347.   next X3H2 meeting is scheduled for March 11-14, 1996 in Kansas.
  4348.  
  4349.   Inquiries regarding this project should be sent to the
  4350.  
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.           Chairman of X3H2,
  4358.           Dr. Donald R. Deutsch,
  4359.           Sybase, Inc., Suite 800,
  4360.           6550 Rock Spring
  4361.           Drive, Bethesda, MD  20817.
  4362.           Email: deutsch@sybase.com.
  4363.  
  4364.  
  4365.  
  4366.  
  4367.   An initial call for possible patents and other pertinent issues (copy¡
  4368.   rights, trademarks) is now being issued.  Please submit information on
  4369.   these issues to the
  4370.  
  4371.  
  4372.                X3 Secretariat at
  4373.                1250 Eye Street
  4374.                NW, Suite 200,
  4375.                Washington DC  20005.
  4376.                Email: x3sec@itic.nw.dc.us
  4377.                FAX:  (202)638-4922.
  4378.  
  4379.  
  4380.  
  4381.  
  4382.   23.17.  Part 8 - ISO/ANSI SQL MULTIMEDIA (SQL/MM)
  4383.  
  4384.   A new ISO/IEC international standardization project for development of
  4385.   an SQL class library for multimedia applications was approved in early
  4386.   1993.  This new standardization activity, named SQL Multimedia
  4387.   (SQL/MM), will specify packages of SQL abstract data type (ADT)
  4388.   definitions using the facilities for ADT specification and invocation
  4389.   provided in the emerging SQL3 specification. SQL/MM intends to
  4390.   standardize class libraries for science and engineering, full-text and
  4391.   document processing, and methods for the management of multimedia
  4392.   objects such as image, sound, animation, music, and video. It will
  4393.   likely provide an SQL language binding for multimedia objects defined
  4394.   by other JTC1 standardization bodies (e.g. SC18 for documents, SC24
  4395.   for images, and SC29 for photographs and motion pictures).
  4396.  
  4397.   The Project Plan for SQL/MM indicates that it will be a multi-part
  4398.   standard consisting of an evolving number of parts. Part 1 will be a
  4399.   Framework that specifies how the other parts are to be constructed.
  4400.   Each of the other parts will be devoted to a specific SQL application
  4401.   package. The following SQL/MM Part structure exists as of August 1994:
  4402.  
  4403.  
  4404.   ╖  Part 1: Framework A non-technical description of how the document
  4405.      is structured.
  4406.  
  4407.   ╖  Part 2: Full Text Methods and ADTs for text data processing. About
  4408.      45 pages.
  4409.  
  4410.   ╖  Part 3: Spatial Methods and ADTs for spatial data management. About
  4411.      200 pages with active contributions from Spatial Data experts from
  4412.      3 national bodies.
  4413.  
  4414.   ╖  Part 4: General Purpose Methods and ADTs for complex numbers,
  4415.      Facilities include trig and exponential functions, vectors, sets,
  4416.      etc.  Currently about 90 pages.
  4417.  
  4418.   There are a number of standards efforts in the area of Spatial and
  4419.   Geographic information:
  4420.  
  4421.  
  4422.  
  4423.   ╖  ANSI X3L1 - Geographic Information Systems.  Mark Ashworth of
  4424.      Unisys is the liason between X3L1 and ANSI X3H2. He is also the
  4425.      editor for parts 1, 3, and 4 of the SQL/MM draft.
  4426.  
  4427.   ╖  ISO TC 211 - Geographic information/Geomatics
  4428.  
  4429.   24.  Technical support for PostgreSQL
  4430.  
  4431.   If you have any technical question or encounter any problem you can e-
  4432.   mail to:
  4433.  
  4434.   ╖  pgsql-questions@postgresql.org
  4435.  
  4436.      and expect e-mail answer in less than a day. As the user-base of
  4437.      internet product is very vast, and users support other users,
  4438.      internet will be capable of giving technical support to billions of
  4439.      users easily. Email support is much more convenient than telephone
  4440.      support as you can cut and paste error messages, program output
  4441.      etc.. and easily transmit to mailing list/newsgroup.
  4442.  
  4443.   In the near future, PostgreSQL organisation will be selling technical
  4444.   support to large/small companies, the revenue generated will be used
  4445.   for maintaining several mirror sites (web and ftp) around the world.
  4446.   The revenue will also be used to produce printed documentation,
  4447.   guides, textbooks which will help the customers.
  4448.  
  4449.   You can also take help from professional consulting firms like
  4450.   Anderson, WGS (Work Group Solutions). Contact them for help, since
  4451.   they are very good expertise in "C", "C++" (PostgreSQL is written in
  4452.   "C") -
  4453.  
  4454.   ╖  Work Group Solutions  <http://www.wgs.com>
  4455.  
  4456.   ╖  Anderson Consulting  <http://www.ac.com>
  4457.  
  4458.   25.  Economic and Business Aspects
  4459.  
  4460.   Commercial databases pay many taxes like federal, state, sales,
  4461.   employment, social security, medicare taxes, health care for
  4462.   employees, bunch of benefits for employees, marketing and
  4463.   advertisement costs. All these costs do not go directly for the
  4464.   development of the database. When you buy a commercial database, some
  4465.   portion of the amount goes for overheads like taxes, expenses and
  4466.   balance for database R&D costs.
  4467.  
  4468.   Also commercial databases have to pay for buildings/real-estates and
  4469.   purchase Unix machines, install and maintain them. All of these costs
  4470.   are passed onto customers.
  4471.  
  4472.   PostgreSQL has the advantage over commercial databases as there is no
  4473.   direct tax since it is made on the internet. A very vast group of
  4474.   people contribute to the development of the PostgreSQL. For example,
  4475.   in a hypothetical case, if there are one million companies in U.S.A
  4476.   and each contribute about $ 10 (worth of software to PostgreSQL) than
  4477.   each and every company will get ten million dollars!! This is the
  4478.   GREAT MAGIC of software development on internet.
  4479.  
  4480.   Currently, PostgreSQL source code is about 2,00,000 lines of "C",
  4481.   "C++" code. If cost of each line of "C" code is $ 2 than the total
  4482.   cost of PostgreSQL as of today is $ 4,00,000 (four hundred thousand
  4483.   dollars!).
  4484.  
  4485.   Many companies already develop in-house vast amount of "C", "C++"
  4486.   code. Hence by taking in the source code of PostgreSQL and
  4487.   collaborating with other companies on internet will greatly benefit
  4488.   the company saving time and efforts.
  4489.   26.  List of Other Databases
  4490.  
  4491.   Listed below are other SQL databases for Unix, Linux.
  4492.  
  4493.   ╖  Click and go to Applications->databases.
  4494.      <http://www.caldera.com/tech-ref/linuxapps/linapps.html>
  4495.  
  4496.   ╖  Click and go to Applications->databases.
  4497.      <http://www.xnet.com/~blatura/linapps.shtml>
  4498.  
  4499.   ╖  Database resources  <http://linas.org/linux/db.html> This was
  4500.      written by Linas Vepstas: linas@fc.net
  4501.  
  4502.   ╖  Free Database List
  4503.      <http://cuiwww.unige.ch:80/~scg/FreeDB/FreeDB.list.html>
  4504.  
  4505.   ╖  Browne's RDBMS List <http://www.hex.net/~cbbrowne/rdbms.html>
  4506.      written by Christopher B. Browne cbbrowne@hex.net
  4507.  
  4508.   ╖  SAL's List of Relational DBMS <http://SAL.KachinaTech.COM/H/1/>
  4509.  
  4510.   ╖  SAL's List of Object-Oriented DBMS
  4511.      <http://SAL.KachinaTech.COM/H/2/>
  4512.  
  4513.   ╖  SAL's List of Utilites and Other Databases
  4514.      <http://SAL.KachinaTech.COM/H/3/>
  4515.  
  4516.   ╖  ACM SIGMOD Index of Publicly Available Database Software
  4517.      <http://bunny.cs.uiuc.edu/sigmod/databaseSoftware/>
  4518.  
  4519.   27.  Internet World Wide Web Searching Tips
  4520.  
  4521.   Internet is very vast and it has vast number of software and has a
  4522.   ocean of information underneath. It is growing at the rate of 300%
  4523.   annually world wide. It is estimated that there are about 10 million
  4524.   Web sites world wide!
  4525.  
  4526.   To search for a information you would use search engines like "Yahoo",
  4527.   "Netscape", "Lycos" etc. Go to Yahoo, click on search.  Use filtering
  4528.   options to narrow down your search criteria. The default search action
  4529.   is "Intelligent search" which is more general and lists all
  4530.   possiblities. Click on "Options" to select "EXACT phrase" search,
  4531.   "AND" search, "OR" search, etc.. This way you would find the
  4532.   information you need much faster. Also in the search menu, there are
  4533.   radio-buttons for searching in Usenet, Web-sites and Yahoo sites.
  4534.  
  4535.   28.  Conclusion
  4536.  
  4537.   After researching all the available databases which are free and
  4538.   source code is available, it was found that ONLY PostgreSQL is the
  4539.   MOST mature, most widely used and robust RDBMS SQL free database
  4540.   (object relational) in the world.
  4541.  
  4542.   PostgreSQL is very appealing as lot of work had already been done and
  4543.   it has ODBC, JDBC drivers using these it is possible to write
  4544.   applications independent of the databases. The applications written in
  4545.   PostgreSQL using ODBC, JDBC drivers are easily portable to other
  4546.   databases like Oracle, Sybase and Informix. And applications written
  4547.   for Oracle, Sybase and Informix using ODBC, JDBC drivers are easily
  4548.   portable to PostgreSQL database.
  4549.  
  4550.   You may ask "But why PostgreSQL ?" The answer is, since it takes lot
  4551.   more time to develop a database system from scratch, it makes sense to
  4552.   pick up a database system which satisfies the following conditions -
  4553.  
  4554.  
  4555.   A database system
  4556.  
  4557.   ╖  Whose source code is available - Must be a 'Open Source Code'
  4558.      system
  4559.  
  4560.   ╖  Has no license strings, no ownership strings attached to it
  4561.  
  4562.   ╖  Which can be distributed on internet
  4563.  
  4564.   ╖  Which had been on development for several years.
  4565.  
  4566.   ╖  Which satisfies standards like ISO/ANSI SQL 92 (and SQL 89)
  4567.  
  4568.   ╖  Which can satisfy future needs like SQL 3 (SQL 98)
  4569.  
  4570.   ╖  Which has advanced capabilities
  4571.  
  4572.      And it just happens to be 'PostgreSQL' which satisfies all these
  4573.      conditions and is an appropriate software for this situation.
  4574.  
  4575.   29.  FAQ - Questions on PostgreSQL
  4576.  
  4577.   Please refer to the latest version of FAQ for General, Linux and Irix
  4578.   at
  4579.  
  4580.   ╖  <http://www.postgresql.org/docs/faq-english.shtml>
  4581.  
  4582.   30.  Copyright Notice
  4583.  
  4584.   Copyright (c) 1997 Al Dev (Alavoor Vasudevan). All rights reserved.
  4585.  
  4586.   NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall the author
  4587.   of this document be liable for any damages whatsoever (including
  4588.   without limitation, special, incidental, consequential, or
  4589.   direct/indirect damages for personal injury, loss of business profits,
  4590.   business interruption, loss of business information, or any other
  4591.   pecuniary loss) arising out of the use of this document.
  4592.  
  4593.   Author offers no warranties or guarantees on fitness, usability,
  4594.   merchantability of this document. Brands, companies and product names
  4595.   mentioned in this document are trademarks or registered trademarks of
  4596.   their respective holders.  Please refer to individual copyright
  4597.   notices of brands, companies and products mentioned in this document.
  4598.   It is your responsibility to read and understand the copyright notices
  4599.   of the organisations/companies/products/authors mentioned in this
  4600.   document before using their respective information.
  4601.  
  4602.   AE.  Appendix A - Syntax of ANSI/ISO SQL 1992
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.   This file contains a depth-first tree traversal of the BNF
  4622.   for the  language done at about 27-AUG-1992 11:03:41.64.
  4623.   The specific version of the BNF included here is:  ANSI-only, SQL2-only.
  4624.  
  4625.  
  4626.   <SQL terminal character> ::=
  4627.         <SQL language character>
  4628.       | <SQL embedded language character>
  4629.  
  4630.   <SQL language character> ::=
  4631.         <simple Latin letter>
  4632.       | <digit>
  4633.       | <SQL special character>
  4634.  
  4635.   <simple Latin letter> ::=
  4636.         <simple Latin upper case letter>
  4637.       | <simple Latin lower case letter>
  4638.  
  4639.   <simple Latin upper case letter> ::=
  4640.             A | B | C | D | E | F | G | H | I | J | K | L | M | N | O
  4641.       | P | Q | R | S | T | U | V | W | X | Y | Z
  4642.  
  4643.   <simple Latin lower case letter> ::=
  4644.             a | b | c | d | e | f | g | h | i | j | k | l | m | n | o
  4645.       | p | q | r | s | t | u | v | w | x | y | z
  4646.  
  4647.   <digit> ::=
  4648.       0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
  4649.  
  4650.   <SQL special character> ::=
  4651.         <space>
  4652.       | <double quote>
  4653.       | <percent>
  4654.       | <ampersand>
  4655.       | <quote>
  4656.       | <left paren>
  4657.       | <right paren>
  4658.       | <asterisk>
  4659.       | <plus sign>
  4660.       | <comma>
  4661.       | <minus sign>
  4662.       | <period>
  4663.       | <solidus>
  4664.       | <colon>
  4665.       | <semicolon>
  4666.       | <less than operator>
  4667.       | <equals operator>
  4668.       | <greater than operator>
  4669.       | <question mark>
  4670.       | <underscore>
  4671.       | <vertical bar>
  4672.  
  4673.   <space> ::= !! <EMPHASIS>(space character in character set in use)
  4674.  
  4675.   <double quote> ::= "
  4676.  
  4677.   <percent> ::= %
  4678.  
  4679.   <ampersand> ::= &
  4680.  
  4681.   <quote> ::= '
  4682.  
  4683.   <left paren> ::= (
  4684.  
  4685.   <right paren> ::= )
  4686.  
  4687.   <asterisk> ::= *
  4688.  
  4689.   <plus sign> ::= +
  4690.  
  4691.   <comma> ::= ,
  4692.  
  4693.   <minus sign> ::= -
  4694.  
  4695.   <period> ::= .
  4696.  
  4697.   <solidus> ::= /
  4698.  
  4699.   <colon> ::= :
  4700.  
  4701.   <semicolon> ::= ;
  4702.  
  4703.   <less than operator> ::= <
  4704.  
  4705.   <equals operator> ::= =
  4706.  
  4707.   <greater than operator> ::= >
  4708.  
  4709.   <question mark> ::= ?
  4710.  
  4711.   <underscore> ::= _
  4712.  
  4713.   <vertical bar> ::= |
  4714.  
  4715.   <SQL embedded language character> ::=
  4716.         <left bracket>
  4717.       | <right bracket>
  4718.  
  4719.   <left bracket> ::= [
  4720.  
  4721.   <right bracket> ::= ]
  4722.  
  4723.   <token> ::=
  4724.         <nondelimiter token>
  4725.       | <delimiter token>
  4726.  
  4727.   <nondelimiter token> ::=
  4728.         <regular identifier>
  4729.       | <key word>
  4730.       | <unsigned numeric literal>
  4731.       | <national character string literal>
  4732.       | <bit string literal>
  4733.       | <hex string literal>
  4734.  
  4735.   <regular identifier> ::= <identifier body>
  4736.  
  4737.   <identifier body> ::=
  4738.       <identifier start> [ ( <underscore> | <identifier part> )... ]
  4739.  
  4740.   <identifier start> ::= <EMPHASIS>(!! See the Syntax Rules)
  4741.  
  4742.   <identifier part> ::=
  4743.         <identifier start>
  4744.       | <digit>
  4745.  
  4746.   <key word> ::=
  4747.         <reserved word>
  4748.       | <non-reserved word>
  4749.  
  4750.   <reserved word> ::=
  4751.         ABSOLUTE | ACTION | ADD | ALL
  4752.       | ALLOCATE | ALTER | AND
  4753.       | ANY | ARE
  4754.       | AS | ASC
  4755.       | ASSERTION | AT
  4756.       | AUTHORIZATION | AVG
  4757.       | BEGIN | BETWEEN | BIT | BIT_LENGTH
  4758.       | BOTH | BY
  4759.       | CASCADE | CASCADED | CASE | CAST
  4760.       | CATALOG
  4761.       | CHAR | CHARACTER | CHAR_LENGTH
  4762.       | CHARACTER_LENGTH | CHECK | CLOSE | COALESCE
  4763.       | COLLATE | COLLATION
  4764.       | COLUMN | COMMIT
  4765.       | CONNECT
  4766.       | CONNECTION | CONSTRAINT
  4767.       | CONSTRAINTS | CONTINUE
  4768.       | CONVERT | CORRESPONDING | COUNT | CREATE | CROSS
  4769.       | CURRENT
  4770.       | CURRENT_DATE | CURRENT_TIME
  4771.       | CURRENT_TIMESTAMP | CURRENT_USER | CURSOR
  4772.       | DATE | DAY | DEALLOCATE | DEC
  4773.       | DECIMAL | DECLARE | DEFAULT | DEFERRABLE
  4774.       | DEFERRED | DELETE | DESC | DESCRIBE | DESCRIPTOR
  4775.       | DIAGNOSTICS
  4776.       | DISCONNECT | DISTINCT | DOMAIN | DOUBLE | DROP
  4777.       | ELSE | END | END-EXEC | ESCAPE
  4778.       | EXCEPT | EXCEPTION
  4779.       | EXEC | EXECUTE | EXISTS
  4780.       | EXTERNAL | EXTRACT
  4781.       | FALSE | FETCH | FIRST | FLOAT | FOR
  4782.       | FOREIGN | FOUND | FROM | FULL
  4783.       | GET | GLOBAL | GO | GOTO
  4784.       | GRANT | GROUP
  4785.       | HAVING | HOUR
  4786.       | IDENTITY | IMMEDIATE | IN | INDICATOR
  4787.       | INITIALLY | INNER | INPUT
  4788.       | INSENSITIVE | INSERT | INT | INTEGER | INTERSECT
  4789.       | INTERVAL | INTO | IS
  4790.       | ISOLATION
  4791.       | JOIN
  4792.       | KEY
  4793.       | LANGUAGE | LAST | LEADING | LEFT
  4794.       | LEVEL | LIKE | LOCAL | LOWER
  4795.       | MATCH | MAX | MIN | MINUTE | MODULE
  4796.       | MONTH
  4797.       | NAMES | NATIONAL | NATURAL | NCHAR | NEXT | NO
  4798.       | NOT | NULL
  4799.       | NULLIF | NUMERIC
  4800.       | OCTET_LENGTH | OF
  4801.       | ON | ONLY | OPEN | OPTION | OR
  4802.       | ORDER | OUTER
  4803.       | OUTPUT | OVERLAPS
  4804.       | PAD | PARTIAL | POSITION | PRECISION | PREPARE
  4805.       | PRESERVE | PRIMARY
  4806.       | PRIOR | PRIVILEGES | PROCEDURE | PUBLIC
  4807.       | READ | REAL | REFERENCES | RELATIVE | RESTRICT
  4808.       | REVOKE | RIGHT
  4809.       | ROLLBACK | ROWS
  4810.       | SCHEMA | SCROLL | SECOND | SECTION
  4811.       | SELECT
  4812.       | SESSION | SESSION_USER | SET
  4813.       | SIZE | SMALLINT | SOME | SPACE | SQL | SQLCODE
  4814.       | SQLERROR | SQLSTATE
  4815.       | SUBSTRING | SUM | SYSTEM_USER
  4816.       | TABLE | TEMPORARY
  4817.       | THEN | TIME | TIMESTAMP
  4818.       | TIMEZONE_HOUR | TIMEZONE_MINUTE
  4819.       | TO | TRAILING | TRANSACTION
  4820.       | TRANSLATE | TRANSLATION | TRIM | TRUE
  4821.       | UNION | UNIQUE | UNKNOWN | UPDATE | UPPER | USAGE
  4822.       | USER | USING
  4823.       | VALUE | VALUES | VARCHAR | VARYING | VIEW
  4824.       | WHEN | WHENEVER | WHERE | WITH | WORK | WRITE
  4825.       | YEAR
  4826.       | ZONE
  4827.  
  4828.   <non-reserved word> ::=
  4829.  
  4830.         ADA
  4831.       | C | CATALOG_NAME
  4832.       | CHARACTER_SET_CATALOG | CHARACTER_SET_NAME
  4833.       | CHARACTER_SET_SCHEMA | CLASS_ORIGIN | COBOL | COLLATION_CATALOG
  4834.       | COLLATION_NAME | COLLATION_SCHEMA | COLUMN_NAME | COMMAND_FUNCTION
  4835.       | COMMITTED
  4836.       | CONDITION_NUMBER | CONNECTION_NAME | CONSTRAINT_CATALOG | CONSTRAINT_NAME
  4837.       | CONSTRAINT_SCHEMA | CURSOR_NAME
  4838.       | DATA | DATETIME_INTERVAL_CODE
  4839.       | DATETIME_INTERVAL_PRECISION | DYNAMIC_FUNCTION
  4840.       | FORTRAN
  4841.       | LENGTH
  4842.       | MESSAGE_LENGTH | MESSAGE_OCTET_LENGTH | MESSAGE_TEXT | MORE | MUMPS
  4843.       | NAME | NULLABLE | NUMBER
  4844.       | PASCAL | PLI
  4845.       | REPEATABLE | RETURNED_LENGTH | RETURNED_OCTET_LENGTH | RETURNED_SQLSTATE
  4846.       | ROW_COUNT
  4847.       | SCALE | SCHEMA_NAME | SERIALIZABLE | SERVER_NAME | SUBCLASS_ORIGIN
  4848.       | TABLE_NAME | TYPE
  4849.       | UNCOMMITTED | UNNAMED
  4850.  
  4851.   <unsigned numeric literal> ::=
  4852.         <exact numeric literal>
  4853.       | <approximate numeric literal>
  4854.  
  4855.   <exact numeric literal> ::=
  4856.         <unsigned integer> [ <period> [ <unsigned integer> ] ]
  4857.       | <period> <unsigned integer>
  4858.  
  4859.   <unsigned integer> ::= <digit>...
  4860.  
  4861.   <approximate numeric literal> ::= <mantissa> E <exponent>
  4862.  
  4863.   <mantissa> ::= <exact numeric literal>
  4864.  
  4865.   <exponent> ::= <signed integer>
  4866.  
  4867.   <signed integer> ::= [ <sign> ] <unsigned integer>
  4868.  
  4869.   <sign> ::= <plus sign> | <minus sign>
  4870.  
  4871.   <national character string literal> ::=
  4872.       N <quote> [ <character representation>... ] <quote>
  4873.         [ ( <separator>... <quote> [ <character representation>... ] <quote> )... ]
  4874.  
  4875.   <character representation> ::=
  4876.         <nonquote character>
  4877.       | <quote symbol>
  4878.  
  4879.   <nonquote character> ::= !! <EMPHASIS>(See the Syntax Rules.)
  4880.  
  4881.   <quote symbol> ::= <quote><quote>
  4882.  
  4883.   <separator> ::= ( <comment> | <space> | <newline> )...
  4884.  
  4885.   <comment> ::=
  4886.       <comment introducer> [ <comment character>... ] <newline>
  4887.  
  4888.   <comment introducer> ::= <minus sign><minus sign>[<minus sign>...]
  4889.  
  4890.   <comment character> ::=
  4891.         <nonquote character>
  4892.       | <quote>
  4893.  
  4894.   <newline> ::= !! <EMPHASIS>(implementation-defined end-of-line indicator)
  4895.  
  4896.   <bit string literal> ::=
  4897.       B <quote> [ <bit>... ] <quote>
  4898.         [ ( <separator>... <quote> [ <bit>... ] <quote> )... ]
  4899.  
  4900.   <bit> ::= 0 | 1
  4901.  
  4902.   <hex string literal> ::=
  4903.       X <quote> [ <hexit>... ] <quote>
  4904.         [ ( <separator>... <quote> [ <hexit>... ] <quote> )... ]
  4905.  
  4906.   <hexit> ::= <digit> | A | B | C | D | E | F | a | b | c | d | e | f
  4907.  
  4908.   <delimiter token> ::=
  4909.         <character string literal>
  4910.       | <date string>
  4911.       | <time string>
  4912.       | <timestamp string>
  4913.       | <interval string>
  4914.       | <delimited identifier>
  4915.       | <SQL special character>
  4916.       | <not equals operator>
  4917.       | <greater than or equals operator>
  4918.       | <less than or equals operator>
  4919.       | <concatenation operator>
  4920.       | <double period>
  4921.       | <left bracket>
  4922.       | <right bracket>
  4923.  
  4924.   <character string literal> ::=
  4925.       [ <introducer><character set specification> ]
  4926.       <quote> [ <character representation>... ] <quote>
  4927.         [ ( <separator>... <quote> [ <character representation>... ] <quote> )... ]
  4928.  
  4929.   <introducer> ::= <underscore>
  4930.  
  4931.   <character set specification> ::=
  4932.         <standard character repertoire name>
  4933.       | <implementation-defined character repertoire name>
  4934.       | <user-defined character repertoire name>
  4935.       | <standard universal character form-of-use name>
  4936.       | <implementation-defined universal character form-of-use name>
  4937.  
  4938.   <standard character repertoire name> ::= <character set name>
  4939.  
  4940.   <character set name> ::= [ <schema name> <period> ]
  4941.         <SQL language identifier>
  4942.  
  4943.   <schema name> ::=
  4944.       [ <catalog name> <period> ] <unqualified schema name>
  4945.  
  4946.   <catalog name> ::= <identifier>
  4947.  
  4948.   <identifier> ::=
  4949.       [ <introducer><character set specification> ] <actual identifier>
  4950.  
  4951.   <actual identifier> ::=
  4952.         <regular identifier>
  4953.       | <delimited identifier>
  4954.  
  4955.   <delimited identifier> ::=
  4956.       <double quote> <delimited identifier body> <double quote>
  4957.  
  4958.   <delimited identifier body> ::= <delimited identifier part>...
  4959.  
  4960.   <delimited identifier part> ::=
  4961.         <nondoublequote character>
  4962.       | <doublequote symbol>
  4963.  
  4964.   <nondoublequote character> ::= <EMPHASIS>(!! See the Syntax Rules)
  4965.  
  4966.   <doublequote symbol> ::= <double quote><double quote>
  4967.  
  4968.   <unqualified schema name> ::= <identifier>
  4969.  
  4970.   <SQL language identifier> ::=
  4971.       <SQL language identifier start>
  4972.          [ ( <underscore> | <SQL language identifier part> )... ]
  4973.  
  4974.   <SQL language identifier start> ::= <simple Latin letter>
  4975.  
  4976.   <SQL language identifier part> ::=
  4977.         <simple Latin letter>
  4978.       | <digit>
  4979.  
  4980.   <implementation-defined character repertoire name> ::=
  4981.       <character set name>
  4982.  
  4983.   <user-defined character repertoire name> ::= <character set name>
  4984.  
  4985.   <standard universal character form-of-use name> ::=
  4986.       <character set name>
  4987.  
  4988.   <implementation-defined universal character form-of-use name> ::=
  4989.       <character set name>
  4990.  
  4991.   <date string> ::=
  4992.       <quote> <date value> <quote>
  4993.  
  4994.   <date value> ::=
  4995.       <years value> <minus sign> <months value>
  4996.           <minus sign> <days value>
  4997.  
  4998.   <years value> ::= <datetime value>
  4999.  
  5000.   <datetime value> ::= <unsigned integer>
  5001.  
  5002.   <months value> ::= <datetime value>
  5003.  
  5004.   <days value> ::= <datetime value>
  5005.  
  5006.   <time string> ::=
  5007.       <quote> <time value> [ <time zone interval> ] <quote>
  5008.  
  5009.   <time value> ::=
  5010.       <hours value> <colon> <minutes value> <colon> <seconds value>
  5011.  
  5012.   <hours value> ::= <datetime value>
  5013.  
  5014.   <minutes value> ::= <datetime value>
  5015.  
  5016.   <seconds value> ::=
  5017.         <seconds integer value> [ <period> [ <seconds fraction> ] ]
  5018.  
  5019.   <seconds integer value> ::= <unsigned integer>
  5020.  
  5021.   <seconds fraction> ::= <unsigned integer>
  5022.  
  5023.   <time zone interval> ::=
  5024.       <sign> <hours value> <colon> <minutes value>
  5025.  
  5026.   <timestamp string> ::=
  5027.       <quote> <date value> <space> <time value>
  5028.           [ <time zone interval> ] <quote>
  5029.  
  5030.   <interval string> ::=
  5031.       <quote> ( <year-month literal> | <day-time literal> ) <quote>
  5032.  
  5033.   <year-month literal> ::=
  5034.         <years value>
  5035.       | [ <years value> <minus sign> ] <months value>
  5036.  
  5037.   <day-time literal> ::=
  5038.         <day-time interval>
  5039.       | <time interval>
  5040.  
  5041.   <day-time interval> ::=
  5042.       <days value>
  5043.         [ <space> <hours value> [ <colon> <minutes value>
  5044.           [ <colon> <seconds value> ] ] ]
  5045.  
  5046.   <time interval> ::=
  5047.         <hours value> [ <colon> <minutes value> [ <colon> <seconds value> ] ]
  5048.       | <minutes value> [ <colon> <seconds value> ]
  5049.       | <seconds value>
  5050.  
  5051.   <not equals operator> ::= <>
  5052.  
  5053.   <greater than or equals operator> ::= >=
  5054.  
  5055.   <less than or equals operator> ::= <=
  5056.  
  5057.   <concatenation operator> ::= ||
  5058.  
  5059.   <double period> ::= ..
  5060.  
  5061.   <module> ::=
  5062.       <module name clause>
  5063.       <language clause>
  5064.       <module authorization clause>
  5065.       [ <temporary table declaration>... ]
  5066.       <module contents>...
  5067.  
  5068.   <module name clause> ::=
  5069.       MODULE [ <module name> ]
  5070.         [ <module character set specification> ]
  5071.  
  5072.   <module name> ::= <identifier>
  5073.  
  5074.   <module character set specification> ::=
  5075.       NAMES ARE <character set specification>
  5076.  
  5077.   <language clause> ::=
  5078.       LANGUAGE <language name>
  5079.  
  5080.   <language name> ::=
  5081.       ADA | C | COBOL | FORTRAN | MUMPS | PASCAL | PLI
  5082.  
  5083.   <module authorization clause> ::=
  5084.         SCHEMA <schema name>
  5085.       | AUTHORIZATION <module authorization identifier>
  5086.       | SCHEMA <schema name>
  5087.             AUTHORIZATION <module authorization identifier>
  5088.  
  5089.   <module authorization identifier> ::=
  5090.       <authorization identifier>
  5091.  
  5092.   <authorization identifier> ::= <identifier>
  5093.  
  5094.   <temporary table declaration> ::=
  5095.       DECLARE LOCAL TEMPORARY TABLE
  5096.           <qualified local table name>
  5097.         <table element list>
  5098.         [ ON COMMIT ( PRESERVE | DELETE ) ROWS ]
  5099.  
  5100.   <qualified local table name> ::=
  5101.       MODULE <period> <local table name>
  5102.  
  5103.   <local table name> ::= <qualified identifier>
  5104.  
  5105.   <qualified identifier> ::= <identifier>
  5106.  
  5107.   <table element list> ::=
  5108.         <left paren> <table element> [ ( <comma> <table element> )... ] <right paren>
  5109.  
  5110.   <table element> ::=
  5111.         <column definition>
  5112.       | <table constraint definition>
  5113.  
  5114.   <column definition> ::=
  5115.       <column name> ( <data type> | <domain name> )
  5116.       [ <default clause> ]
  5117.       [ <column constraint definition>... ]
  5118.       [ <collate clause> ]
  5119.  
  5120.   <column name> ::= <identifier>
  5121.  
  5122.   <data type> ::=
  5123.         <character string type>
  5124.              [ CHARACTER SET <character set specification> ]
  5125.       | <national character string type>
  5126.       | <bit string type>
  5127.       | <numeric type>
  5128.       | <datetime type>
  5129.       | <interval type>
  5130.  
  5131.   <character string type> ::=
  5132.         CHARACTER [ <left paren> <length> <right paren> ]
  5133.       | CHAR [ <left paren> <length> <right paren> ]
  5134.       | CHARACTER VARYING <left paren> <length> <right paren>
  5135.       | CHAR VARYING <left paren> <length> <right paren>
  5136.       | VARCHAR <left paren> <length> <right paren>
  5137.  
  5138.   <length> ::= <unsigned integer>
  5139.  
  5140.   <national character string type> ::=
  5141.         NATIONAL CHARACTER [ <left paren> <length> <right paren> ]
  5142.       | NATIONAL CHAR [ <left paren> <length> <right paren> ]
  5143.       | NCHAR [ <left paren> <length> <right paren> ]
  5144.       | NATIONAL CHARACTER VARYING <left paren> <length> <right paren>
  5145.       | NATIONAL CHAR VARYING <left paren> <length> <right paren>
  5146.       | NCHAR VARYING <left paren> <length> <right paren>
  5147.  
  5148.   <bit string type> ::=
  5149.         BIT [ <left paren> <length> <right paren> ]
  5150.       | BIT VARYING <left paren> <length> <right paren>
  5151.  
  5152.   <numeric type> ::=
  5153.         <exact numeric type>
  5154.       | <approximate numeric type>
  5155.  
  5156.   <exact numeric type> ::=
  5157.         NUMERIC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
  5158.       | DECIMAL [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
  5159.       | DEC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
  5160.       | INTEGER
  5161.       | INT
  5162.       | SMALLINT
  5163.  
  5164.   <precision> ::= <unsigned integer>
  5165.  
  5166.   <scale> ::= <unsigned integer>
  5167.  
  5168.   <approximate numeric type> ::=
  5169.         FLOAT [ <left paren> <precision> <right paren> ]
  5170.       | REAL
  5171.       | DOUBLE PRECISION
  5172.  
  5173.   <datetime type> ::=
  5174.         DATE
  5175.       | TIME [ <left paren> <time precision> <right paren> ]
  5176.             [ WITH TIME ZONE ]
  5177.       | TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]
  5178.             [ WITH TIME ZONE ]
  5179.  
  5180.   <time precision> ::= <time fractional seconds precision>
  5181.  
  5182.   <time fractional seconds precision> ::= <unsigned integer>
  5183.  
  5184.   <timestamp precision> ::= <time fractional seconds precision>
  5185.  
  5186.   <interval type> ::= INTERVAL <interval qualifier>
  5187.  
  5188.   <interval qualifier> ::=
  5189.         <start field> TO <end field>
  5190.       | <single datetime field>
  5191.  
  5192.   <start field> ::=
  5193.       <non-second datetime field>
  5194.           [ <left paren> <interval leading field precision> <right paren> ]
  5195.  
  5196.   <non-second datetime field> ::= YEAR | MONTH | DAY | HOUR
  5197.       | MINUTE
  5198.  
  5199.   <interval leading field precision> ::= <unsigned integer>
  5200.  
  5201.   <end field> ::=
  5202.         <non-second datetime field>
  5203.       | SECOND [ <left paren> <interval fractional seconds precision> <right paren> ]
  5204.  
  5205.   <interval fractional seconds precision> ::= <unsigned integer>
  5206.  
  5207.   <single datetime field> ::=
  5208.         <non-second datetime field>
  5209.             [ <left paren> <interval leading field precision> <right paren> ]
  5210.       | SECOND [ <left paren> <interval leading field precision>
  5211.             [ <comma> <interval fractional seconds precision> ] <right paren> ]
  5212.  
  5213.   <domain name> ::= <qualified name>
  5214.  
  5215.   <qualified name> ::=
  5216.       [ <schema name> <period> ] <qualified identifier>
  5217.  
  5218.   <default clause> ::=
  5219.         DEFAULT <default option>
  5220.  
  5221.   <default option> ::=
  5222.         <literal>
  5223.       | <datetime value function>
  5224.       | USER
  5225.       | CURRENT_USER
  5226.       | SESSION_USER
  5227.       | SYSTEM_USER
  5228.       | NULL
  5229.  
  5230.   <literal> ::=
  5231.         <signed numeric literal>
  5232.       | <general literal>
  5233.  
  5234.   <signed numeric literal> ::=
  5235.       [ <sign> ] <unsigned numeric literal>
  5236.  
  5237.   <general literal> ::=
  5238.         <character string literal>
  5239.       | <national character string literal>
  5240.       | <bit string literal>
  5241.       | <hex string literal>
  5242.       | <datetime literal>
  5243.       | <interval literal>
  5244.  
  5245.   <datetime literal> ::=
  5246.         <date literal>
  5247.       | <time literal>
  5248.       | <timestamp literal>
  5249.  
  5250.   <date literal> ::=
  5251.       DATE <date string>
  5252.  
  5253.   <time literal> ::=
  5254.       TIME <time string>
  5255.  
  5256.   <timestamp literal> ::=
  5257.       TIMESTAMP <timestamp string>
  5258.  
  5259.   <interval literal> ::=
  5260.       INTERVAL [ <sign> ] <interval string> <interval qualifier>
  5261.  
  5262.   <datetime value function> ::=
  5263.         <current date value function>
  5264.       | <current time value function>
  5265.       | <current timestamp value function>
  5266.  
  5267.   <current date value function> ::= CURRENT_DATE
  5268.  
  5269.   <current time value function> ::=
  5270.         CURRENT_TIME [ <left paren> <time precision> <right paren> ]
  5271.  
  5272.   <current timestamp value function> ::=
  5273.         CURRENT_TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]
  5274.  
  5275.   <column constraint definition> ::=
  5276.       [ <constraint name definition> ]
  5277.       <column constraint>
  5278.         [ <constraint attributes> ]
  5279.  
  5280.   <constraint name definition> ::= CONSTRAINT <constraint name>
  5281.   <constraint name> ::= <qualified name>
  5282.  
  5283.   <column constraint> ::=
  5284.         NOT NULL
  5285.       | <unique specification>
  5286.       | <references specification>
  5287.       | <check constraint definition>
  5288.  
  5289.   <unique specification> ::=
  5290.       UNIQUE | PRIMARY KEY
  5291.  
  5292.   <references specification> ::=
  5293.       REFERENCES <referenced table and columns>
  5294.         [ MATCH <match type> ]
  5295.         [ <referential triggered action> ]
  5296.  
  5297.   <referenced table and columns> ::=
  5298.        <table name> [ <left paren> <reference column list> <right paren> ]
  5299.  
  5300.   <table name> ::=
  5301.         <qualified name>
  5302.       | <qualified local table name>
  5303.  
  5304.   <reference column list> ::= <column name list>
  5305.  
  5306.   <column name list> ::=
  5307.       <column name> [ ( <comma> <column name> )... ]
  5308.  
  5309.   <match type> ::=
  5310.         FULL
  5311.       | PARTIAL
  5312.  
  5313.   <referential triggered action> ::=
  5314.         <update rule> [ <delete rule> ]
  5315.       | <delete rule> [ <update rule> ]
  5316.  
  5317.   <update rule> ::= ON UPDATE <referential action>
  5318.  
  5319.   <referential action> ::=
  5320.         CASCADE
  5321.       | SET NULL
  5322.       | SET DEFAULT
  5323.       | NO ACTION
  5324.  
  5325.   <delete rule> ::= ON DELETE <referential action>
  5326.  
  5327.   <check constraint definition> ::=
  5328.       CHECK
  5329.           <left paren> <search condition> <right paren>
  5330.  
  5331.   <search condition> ::=
  5332.         <boolean term>
  5333.       | <search condition> OR <boolean term>
  5334.  
  5335.   <boolean term> ::=
  5336.         <boolean factor>
  5337.       | <boolean term> AND <boolean factor>
  5338.  
  5339.   <boolean factor> ::=
  5340.       [ NOT ] <boolean test>
  5341.  
  5342.   <boolean test> ::=
  5343.       <boolean primary> [ IS [ NOT ]
  5344.             <truth value> ]
  5345.  
  5346.   <boolean primary> ::=
  5347.         <predicate>
  5348.       | <left paren> <search condition> <right paren>
  5349.  
  5350.   <predicate> ::=
  5351.         <comparison predicate>
  5352.       | <between predicate>
  5353.       | <in predicate>
  5354.       | <like predicate>
  5355.       | <null predicate>
  5356.       | <quantified comparison predicate>
  5357.       | <exists predicate>
  5358.       | <unique predicate>
  5359.       | <match predicate>
  5360.       | <overlaps predicate>
  5361.  
  5362.   <comparison predicate> ::=
  5363.       <row value constructor> <comp op>
  5364.           <row value constructor>
  5365.  
  5366.   <row value constructor> ::=
  5367.          <row value constructor element>
  5368.       | <left paren> <row value constructor list> <right paren>
  5369.       | <row subquery>
  5370.  
  5371.   <row value constructor element> ::=
  5372.         <value expression>
  5373.       | <null specification>
  5374.       | <default specification>
  5375.  
  5376.   <value expression> ::=
  5377.         <numeric value expression>
  5378.       | <string value expression>
  5379.       | <datetime value expression>
  5380.       | <interval value expression>
  5381.  
  5382.   <numeric value expression> ::=
  5383.         <term>
  5384.       | <numeric value expression> <plus sign> <term>
  5385.       | <numeric value expression> <minus sign> <term>
  5386.  
  5387.   <term> ::=
  5388.         <factor>
  5389.       | <term> <asterisk> <factor>
  5390.       | <term> <solidus> <factor>
  5391.  
  5392.   <factor> ::=
  5393.       [ <sign> ] <numeric primary>
  5394.  
  5395.   <numeric primary> ::=
  5396.         <value expression primary>
  5397.       | <numeric value function>
  5398.  
  5399.   <value expression primary> ::=
  5400.         <unsigned value specification>
  5401.       | <column reference>
  5402.       | <set function specification>
  5403.       | <scalar subquery>
  5404.       | <case expression>
  5405.       | <left paren> <value expression> <right paren>
  5406.       | <cast specification>
  5407.  
  5408.   <unsigned value specification> ::=
  5409.         <unsigned literal>
  5410.       | <general value specification>
  5411.  
  5412.   <unsigned literal> ::=
  5413.         <unsigned numeric literal>
  5414.       | <general literal>
  5415.  
  5416.   <general value specification> ::=
  5417.         <parameter specification>
  5418.       | <dynamic parameter specification>
  5419.       | <variable specification>
  5420.       | USER
  5421.       | CURRENT_USER
  5422.       | SESSION_USER
  5423.       | SYSTEM_USER
  5424.       | VALUE
  5425.  
  5426.   <parameter specification> ::=
  5427.       <parameter name> [ <indicator parameter> ]
  5428.  
  5429.   <parameter name> ::= <colon> <identifier>
  5430.  
  5431.   <indicator parameter> ::=
  5432.       [ INDICATOR ] <parameter name>
  5433.  
  5434.   <dynamic parameter specification> ::= <question mark>
  5435.  
  5436.   <variable specification> ::=
  5437.       <embedded variable name> [ <indicator variable> ]
  5438.  
  5439.   <embedded variable name> ::=
  5440.       <colon><host identifier>
  5441.  
  5442.   <host identifier> ::=
  5443.         <Ada host identifier>
  5444.       | <C host identifier>
  5445.       | <COBOL host identifier>
  5446.       | <Fortran host identifier>
  5447.       | <MUMPS host identifier>
  5448.       | <Pascal host identifier>
  5449.       | <PL/I host identifier>
  5450.  
  5451.   <Ada host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)
  5452.  
  5453.   <C host identifier> ::=
  5454.       !! <EMPHASIS>(See the Syntax Rules.)
  5455.  
  5456.   <COBOL host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)
  5457.  
  5458.   <Fortran host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)
  5459.  
  5460.   <MUMPS host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)
  5461.  
  5462.   <Pascal host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)
  5463.  
  5464.   <PL/I host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)
  5465.  
  5466.   <indicator variable> ::=
  5467.       [ INDICATOR ] <embedded variable name>
  5468.  
  5469.   <column reference> ::= [ <qualifier> <period> ] <column name>
  5470.  
  5471.   <qualifier> ::=
  5472.         <table name>
  5473.       | <correlation name>
  5474.  
  5475.   <correlation name> ::= <identifier>
  5476.  
  5477.   <set function specification> ::=
  5478.         COUNT <left paren> <asterisk> <right paren>
  5479.       | <general set function>
  5480.  
  5481.   <general set function> ::=
  5482.         <set function type>
  5483.             <left paren> [ <set quantifier> ] <value expression> <right paren>
  5484.  
  5485.   <set function type> ::=
  5486.       AVG | MAX | MIN | SUM | COUNT
  5487.  
  5488.   <set quantifier> ::= DISTINCT | ALL
  5489.  
  5490.   <scalar subquery> ::= <subquery>
  5491.  
  5492.   <subquery> ::= <left paren> <query expression> <right paren>
  5493.  
  5494.   <query expression> ::=
  5495.         <non-join query expression>
  5496.       | <joined table>
  5497.  
  5498.   <non-join query expression> ::=
  5499.         <non-join query term>
  5500.       | <query expression> UNION  [ ALL ]
  5501.             [ <corresponding spec> ] <query term>
  5502.       | <query expression> EXCEPT [ ALL ]
  5503.             [ <corresponding spec> ] <query term>
  5504.  
  5505.   <non-join query term> ::=
  5506.         <non-join query primary>
  5507.       | <query term> INTERSECT [ ALL ]
  5508.             [ <corresponding spec> ] <query primary>
  5509.  
  5510.   <non-join query primary> ::=
  5511.         <simple table>
  5512.       | <left paren> <non-join query expression> <right paren>
  5513.  
  5514.   <simple table> ::=
  5515.         <query specification>
  5516.       | <table value constructor>
  5517.       | <explicit table>
  5518.  
  5519.   <query specification> ::=
  5520.       SELECT [ <set quantifier> ] <select list> <table expression>
  5521.  
  5522.   <select list> ::=
  5523.         <asterisk>
  5524.       | <select sublist> [ ( <comma> <select sublist> )... ]
  5525.  
  5526.   <select sublist> ::=
  5527.         <derived column>
  5528.       | <qualifier> <period> <asterisk>
  5529.  
  5530.   <derived column> ::= <value expression> [ <as clause> ]
  5531.  
  5532.   <as clause> ::= [ AS ] <column name>
  5533.  
  5534.   <table expression> ::=
  5535.       <from clause>
  5536.       [ <where clause> ]
  5537.       [ <group by clause> ]
  5538.       [ <having clause> ]
  5539.  
  5540.   <from clause> ::= FROM <table reference>
  5541.       [ ( <comma> <table reference> )... ]
  5542.  
  5543.   <table reference> ::=
  5544.         <table name> [ [ AS ] <correlation name>
  5545.             [ <left paren> <derived column list> <right paren> ] ]
  5546.       | <derived table> [ AS ] <correlation name>
  5547.             [ <left paren> <derived column list> <right paren> ]
  5548.       | <joined table>
  5549.  
  5550.   <derived column list> ::= <column name list>
  5551.  
  5552.   <derived table> ::= <table subquery>
  5553.  
  5554.   <table subquery> ::= <subquery>
  5555.  
  5556.   <joined table> ::=
  5557.         <cross join>
  5558.       | <qualified join>
  5559.       | <left paren> <joined table> <right paren>
  5560.  
  5561.   <cross join> ::=
  5562.       <table reference> CROSS JOIN <table reference>
  5563.  
  5564.   <qualified join> ::=
  5565.       <table reference> [ NATURAL ] [ <join type> ] JOIN
  5566.         <table reference> [ <join specification> ]
  5567.  
  5568.   <join type> ::=
  5569.         INNER
  5570.       | <outer join type> [ OUTER ]
  5571.       | UNION
  5572.  
  5573.   <outer join type> ::=
  5574.         LEFT
  5575.       | RIGHT
  5576.       | FULL
  5577.  
  5578.   <join specification> ::=
  5579.         <join condition>
  5580.       | <named columns join>
  5581.  
  5582.   <join condition> ::= ON <search condition>
  5583.  
  5584.   <named columns join> ::=
  5585.       USING <left paren> <join column list> <right paren>
  5586.  
  5587.   <join column list> ::= <column name list>
  5588.  
  5589.   <where clause> ::= WHERE <search condition>
  5590.  
  5591.   <group by clause> ::=
  5592.       GROUP BY <grouping column reference list>
  5593.  
  5594.   <grouping column reference list> ::=
  5595.       <grouping column reference>
  5596.           [ ( <comma> <grouping column reference> )... ]
  5597.  
  5598.   <grouping column reference> ::=
  5599.       <column reference> [ <collate clause> ]
  5600.  
  5601.   <collate clause> ::= COLLATE <collation name>
  5602.  
  5603.   <collation name> ::= <qualified name>
  5604.  
  5605.   <having clause> ::= HAVING <search condition>
  5606.  
  5607.   <table value constructor> ::=
  5608.       VALUES <table value constructor list>
  5609.  
  5610.   <table value constructor list> ::=
  5611.       <row value constructor> [ ( <comma> <row value constructor> )... ]
  5612.  
  5613.   <explicit table> ::= TABLE <table name>
  5614.  
  5615.   <query term> ::=
  5616.         <non-join query term>
  5617.       | <joined table>
  5618.  
  5619.   <corresponding spec> ::=
  5620.       CORRESPONDING [ BY <left paren> <corresponding column list> <right paren> ]
  5621.  
  5622.   <corresponding column list> ::= <column name list>
  5623.  
  5624.   <query primary> ::=
  5625.         <non-join query primary>
  5626.       | <joined table>
  5627.  
  5628.   <case expression> ::=
  5629.         <case abbreviation>
  5630.       | <case specification>
  5631.  
  5632.   <case abbreviation> ::=
  5633.         NULLIF <left paren> <value expression> <comma>
  5634.               <value expression> <right paren>
  5635.       | COALESCE <left paren> <value expression>
  5636.               ( <comma> <value expression> )... <right paren>
  5637.  
  5638.   <case specification> ::=
  5639.         <simple case>
  5640.       | <searched case>
  5641.  
  5642.   <simple case> ::=
  5643.       CASE <case operand>
  5644.         <simple when clause>...
  5645.         [ <else clause> ]
  5646.       END
  5647.  
  5648.   <case operand> ::= <value expression>
  5649.  
  5650.   <simple when clause> ::= WHEN <when operand> THEN <result>
  5651.  
  5652.   <when operand> ::= <value expression>
  5653.  
  5654.   <result> ::= <result expression> | NULL
  5655.  
  5656.   <result expression> ::= <value expression>
  5657.  
  5658.   <else clause> ::= ELSE <result>
  5659.  
  5660.   <searched case> ::=
  5661.       CASE
  5662.         <searched when clause>...
  5663.         [ <else clause> ]
  5664.       END
  5665.  
  5666.   <searched when clause> ::= WHEN <search condition> THEN <result>
  5667.  
  5668.   <cast specification> ::=
  5669.       CAST <left paren> <cast operand> AS
  5670.           <cast target> <right paren>
  5671.  
  5672.   <cast operand> ::=
  5673.         <value expression>
  5674.       | NULL
  5675.  
  5676.   <cast target> ::=
  5677.         <domain name>
  5678.       | <data type>
  5679.  
  5680.   <numeric value function> ::=
  5681.         <position expression>
  5682.       | <extract expression>
  5683.       | <length expression>
  5684.  
  5685.   <position expression> ::=
  5686.       POSITION <left paren> <character value expression>
  5687.           IN <character value expression> <right paren>
  5688.  
  5689.   <character value expression> ::=
  5690.         <concatenation>
  5691.       | <character factor>
  5692.  
  5693.   <concatenation> ::=
  5694.       <character value expression> <concatenation operator>
  5695.           <character factor>
  5696.  
  5697.   <character factor> ::=
  5698.       <character primary> [ <collate clause> ]
  5699.  
  5700.   <character primary> ::=
  5701.         <value expression primary>
  5702.       | <string value function>
  5703.  
  5704.   <string value function> ::=
  5705.         <character value function>
  5706.       | <bit value function>
  5707.  
  5708.   <character value function> ::=
  5709.         <character substring function>
  5710.       | <fold>
  5711.       | <form-of-use conversion>
  5712.       | <character translation>
  5713.       | <trim function>
  5714.  
  5715.   <character substring function> ::=
  5716.       SUBSTRING <left paren> <character value expression> FROM <start position>
  5717.                   [ FOR <string length> ] <right paren>
  5718.  
  5719.   <start position> ::= <numeric value expression>
  5720.  
  5721.   <string length> ::= <numeric value expression>
  5722.  
  5723.   <fold> ::= ( UPPER | LOWER )
  5724.        <left paren> <character value expression> <right paren>
  5725.  
  5726.   <form-of-use conversion> ::=
  5727.       CONVERT <left paren> <character value expression>
  5728.           USING <form-of-use conversion name> <right paren>
  5729.  
  5730.   <form-of-use conversion name> ::= <qualified name>
  5731.  
  5732.   <character translation> ::=
  5733.       TRANSLATE <left paren> <character value expression>
  5734.           USING <translation name> <right paren>
  5735.  
  5736.   <translation name> ::= <qualified name>
  5737.  
  5738.   <trim function> ::=
  5739.       TRIM <left paren> <trim operands> <right paren>
  5740.  
  5741.   <trim operands> ::=
  5742.       [ [ <trim specification> ] [ <trim character> ] FROM ] <trim source>
  5743.   <trim specification> ::=
  5744.         LEADING
  5745.       | TRAILING
  5746.       | BOTH
  5747.  
  5748.   <trim character> ::= <character value expression>
  5749.  
  5750.   <trim source> ::= <character value expression>
  5751.  
  5752.   <bit value function> ::=
  5753.       <bit substring function>
  5754.  
  5755.   <bit substring function> ::=
  5756.       SUBSTRING <left paren> <bit value expression> FROM <start position>
  5757.           [ FOR <string length> ] <right paren>
  5758.  
  5759.   <bit value expression> ::=
  5760.         <bit concatenation>
  5761.       | <bit factor>
  5762.  
  5763.   <bit concatenation> ::=
  5764.       <bit value expression> <concatenation operator> <bit factor>
  5765.  
  5766.   <bit factor> ::= <bit primary>
  5767.  
  5768.   <bit primary> ::=
  5769.         <value expression primary>
  5770.       | <string value function>
  5771.  
  5772.   <extract expression> ::=
  5773.       EXTRACT <left paren> <extract field>
  5774.           FROM <extract source> <right paren>
  5775.  
  5776.   <extract field> ::=
  5777.         <datetime field>
  5778.       | <time zone field>
  5779.  
  5780.   <datetime field> ::=
  5781.         <non-second datetime field>
  5782.       | SECOND
  5783.  
  5784.   <time zone field> ::=
  5785.         TIMEZONE_HOUR
  5786.       | TIMEZONE_MINUTE
  5787.  
  5788.   <extract source> ::=
  5789.         <datetime value expression>
  5790.       | <interval value expression>
  5791.  
  5792.   <datetime value expression> ::=
  5793.         <datetime term>
  5794.       | <interval value expression> <plus sign> <datetime term>
  5795.       | <datetime value expression> <plus sign> <interval term>
  5796.       | <datetime value expression> <minus sign> <interval term>
  5797.  
  5798.   <interval term> ::=
  5799.         <interval factor>
  5800.       | <interval term 2> <asterisk> <factor>
  5801.       | <interval term 2> <solidus> <factor>
  5802.       | <term> <asterisk> <interval factor>
  5803.  
  5804.   <interval factor> ::=
  5805.       [ <sign> ] <interval primary>
  5806.  
  5807.   <interval primary> ::=
  5808.         <value expression primary> [ <interval qualifier> ]
  5809.   <interval term 2> ::= <interval term>
  5810.  
  5811.   <interval value expression> ::=
  5812.         <interval term>
  5813.       | <interval value expression 1> <plus sign> <interval term 1>
  5814.       | <interval value expression 1> <minus sign> <interval term 1>
  5815.       | <left paren> <datetime value expression> <minus sign>
  5816.             <datetime term> <right paren> <interval qualifier>
  5817.  
  5818.   <interval value expression 1> ::= <interval value expression>
  5819.  
  5820.   <interval term 1> ::= <interval term>
  5821.  
  5822.   <datetime term> ::=
  5823.         <datetime factor>
  5824.  
  5825.   <datetime factor> ::=
  5826.         <datetime primary> [ <time zone> ]
  5827.  
  5828.   <datetime primary> ::=
  5829.         <value expression primary>
  5830.       | <datetime value function>
  5831.  
  5832.   <time zone> ::=
  5833.       AT <time zone specifier>
  5834.  
  5835.   <time zone specifier> ::=
  5836.         LOCAL
  5837.       | TIME ZONE <interval value expression>
  5838.  
  5839.   <length expression> ::=
  5840.         <char length expression>
  5841.       | <octet length expression>
  5842.       | <bit length expression>
  5843.  
  5844.   <char length expression> ::=
  5845.       ( CHAR_LENGTH | CHARACTER_LENGTH )
  5846.           <left paren> <string value expression> <right paren>
  5847.  
  5848.   <string value expression> ::=
  5849.         <character value expression>
  5850.       | <bit value expression>
  5851.  
  5852.   <octet length expression> ::=
  5853.       OCTET_LENGTH <left paren> <string value expression> <right paren>
  5854.  
  5855.   <bit length expression> ::=
  5856.       BIT_LENGTH <left paren> <string value expression> <right paren>
  5857.  
  5858.   <null specification> ::=
  5859.       NULL
  5860.  
  5861.   <default specification> ::=
  5862.       DEFAULT
  5863.  
  5864.   <row value constructor list> ::=
  5865.       <row value constructor element>
  5866.           [ ( <comma> <row value constructor element> )... ]
  5867.  
  5868.   <row subquery> ::= <subquery>
  5869.  
  5870.   <comp op> ::=
  5871.         <equals operator>
  5872.       | <not equals operator>
  5873.       | <less than operator>
  5874.       | <greater than operator>
  5875.       | <less than or equals operator>
  5876.       | <greater than or equals operator>
  5877.  
  5878.   <between predicate> ::=
  5879.       <row value constructor> [ NOT ] BETWEEN
  5880.         <row value constructor> AND <row value constructor>
  5881.  
  5882.   <in predicate> ::=
  5883.       <row value constructor>
  5884.         [ NOT ] IN <in predicate value>
  5885.  
  5886.   <in predicate value> ::=
  5887.         <table subquery>
  5888.       | <left paren> <in value list> <right paren>
  5889.  
  5890.   <in value list> ::=
  5891.       <value expression> ( <comma> <value expression> )...
  5892.  
  5893.   <like predicate> ::=
  5894.       <match value> [ NOT ] LIKE <pattern>
  5895.         [ ESCAPE <escape character> ]
  5896.  
  5897.   <match value> ::= <character value expression>
  5898.  
  5899.   <pattern> ::= <character value expression>
  5900.  
  5901.   <escape character> ::= <character value expression>
  5902.  
  5903.   <null predicate> ::= <row value constructor>
  5904.       IS [ NOT ] NULL
  5905.  
  5906.   <quantified comparison predicate> ::=
  5907.       <row value constructor> <comp op> <quantifier> <table subquery>
  5908.  
  5909.   <quantifier> ::= <all> | <some>
  5910.  
  5911.   <all> ::= ALL
  5912.  
  5913.   <some> ::= SOME | ANY
  5914.  
  5915.   <exists predicate> ::= EXISTS <table subquery>
  5916.  
  5917.   <unique predicate> ::= UNIQUE <table subquery>
  5918.  
  5919.   <match predicate> ::=
  5920.       <row value constructor> MATCH [ UNIQUE ]
  5921.           [ PARTIAL | FULL ] <table subquery>
  5922.  
  5923.   <overlaps predicate> ::=
  5924.       <row value constructor 1> OVERLAPS <row value constructor 2>
  5925.  
  5926.   <row value constructor 1> ::= <row value constructor>
  5927.  
  5928.   <row value constructor 2> ::= <row value constructor>
  5929.  
  5930.   <truth value> ::=
  5931.         TRUE
  5932.       | FALSE
  5933.       | UNKNOWN
  5934.  
  5935.   <constraint attributes> ::=
  5936.         <constraint check time> [ [ NOT ] DEFERRABLE ]
  5937.       | [ NOT ] DEFERRABLE [ <constraint check time> ]
  5938.  
  5939.   <constraint check time> ::=
  5940.         INITIALLY DEFERRED
  5941.       | INITIALLY IMMEDIATE
  5942.  
  5943.   <table constraint definition> ::=
  5944.       [ <constraint name definition> ]
  5945.       <table constraint> [ <constraint attributes> ]
  5946.  
  5947.   <table constraint> ::=
  5948.         <unique constraint definition>
  5949.       | <referential constraint definition>
  5950.       | <check constraint definition>
  5951.  
  5952.   <unique constraint definition> ::=
  5953.               <unique specification> even in SQL3)
  5954.       <unique specification>
  5955.         <left paren> <unique column list> <right paren>
  5956.  
  5957.   <unique column list> ::= <column name list>
  5958.  
  5959.   <referential constraint definition> ::=
  5960.       FOREIGN KEY
  5961.           <left paren> <referencing columns> <right paren>
  5962.         <references specification>
  5963.  
  5964.   <referencing columns> ::=
  5965.       <reference column list>
  5966.  
  5967.   <module contents> ::=
  5968.         <declare cursor>
  5969.       | <dynamic declare cursor>
  5970.       | <procedure>
  5971.  
  5972.   <declare cursor> ::=
  5973.       DECLARE <cursor name> [ INSENSITIVE ] [ SCROLL ] CURSOR
  5974.         FOR <cursor specification>
  5975.  
  5976.   <cursor name> ::= <identifier>
  5977.  
  5978.   <cursor specification> ::=
  5979.       <query expression> [ <order by clause> ]
  5980.         [ <updatability clause> ]
  5981.  
  5982.   <order by clause> ::=
  5983.       ORDER BY <sort specification list>
  5984.  
  5985.   <sort specification list> ::=
  5986.       <sort specification> [ ( <comma> <sort specification> )... ]
  5987.  
  5988.   <sort specification> ::=
  5989.       <sort key> [ <collate clause> ] [ <ordering specification> ]
  5990.  
  5991.   <sort key> ::=
  5992.         <column name>
  5993.       | <unsigned integer>
  5994.  
  5995.   <ordering specification> ::= ASC | DESC
  5996.  
  5997.   <updatability clause> ::=
  5998.       FOR
  5999.           ( READ ONLY |
  6000.             UPDATE [ OF <column name list> ] )
  6001.  
  6002.   <dynamic declare cursor> ::=
  6003.       DECLARE <cursor name> [ INSENSITIVE ] [ SCROLL ] CURSOR
  6004.           FOR <statement name>
  6005.  
  6006.   <statement name> ::= <identifier>
  6007.   <procedure> ::=
  6008.       PROCEDURE <procedure name>
  6009.           <parameter declaration list> <semicolon>
  6010.         <SQL procedure statement> <semicolon>
  6011.  
  6012.   <procedure name> ::= <identifier>
  6013.  
  6014.   <parameter declaration list> ::=
  6015.         <left paren> <parameter declaration>
  6016.             [ ( <comma> <parameter declaration> )... ] <right paren>
  6017.       | <parameter declaration>...
  6018.  
  6019.   <parameter declaration> ::=
  6020.         <parameter name> <data type>
  6021.       | <status parameter>
  6022.  
  6023.   <status parameter> ::=
  6024.       SQLCODE | SQLSTATE
  6025.  
  6026.   <SQL procedure statement> ::=
  6027.         <SQL schema statement>
  6028.       | <SQL data statement>
  6029.       | <SQL transaction statement>
  6030.       | <SQL connection statement>
  6031.       | <SQL session statement>
  6032.       | <SQL dynamic statement>
  6033.       | <SQL diagnostics statement>
  6034.  
  6035.   <SQL schema statement> ::=
  6036.         <SQL schema definition statement>
  6037.       | <SQL schema manipulation statement>
  6038.  
  6039.   <SQL schema definition statement> ::=
  6040.         <schema definition>
  6041.       | <table definition>
  6042.       | <view definition>
  6043.       | <grant statement>
  6044.       | <domain definition>
  6045.       | <character set definition>
  6046.       | <collation definition>
  6047.       | <translation definition>
  6048.       | <assertion definition>
  6049.  
  6050.   <schema definition> ::=
  6051.       CREATE SCHEMA <schema name clause>
  6052.         [ <schema character set specification> ]
  6053.         [ <schema element>... ]
  6054.  
  6055.   <schema name clause> ::=
  6056.         <schema name>
  6057.       | AUTHORIZATION <schema authorization identifier>
  6058.       | <schema name> AUTHORIZATION
  6059.             <schema authorization identifier>
  6060.  
  6061.   <schema authorization identifier> ::=
  6062.       <authorization identifier>
  6063.  
  6064.   <schema character set specification> ::=
  6065.       DEFAULT CHARACTER
  6066.           SET <character set specification>
  6067.  
  6068.   <schema element> ::=
  6069.         <domain definition>
  6070.       | <table definition>
  6071.       | <view definition>
  6072.       | <grant statement>
  6073.       | <assertion definition>
  6074.       | <character set definition>
  6075.       | <collation definition>
  6076.       | <translation definition>
  6077.  
  6078.   <domain definition> ::=
  6079.       CREATE DOMAIN <domain name>
  6080.           [ AS ] <data type>
  6081.         [ <default clause> ]
  6082.         [ <domain constraint>... ]
  6083.         [ <collate clause> ]
  6084.  
  6085.   <domain constraint> ::=
  6086.       [ <constraint name definition> ]
  6087.       <check constraint definition> [ <constraint attributes> ]
  6088.  
  6089.   <table definition> ::=
  6090.       CREATE [ ( GLOBAL | LOCAL ) TEMPORARY ] TABLE
  6091.           <table name>
  6092.         <table element list>
  6093.         [ ON COMMIT ( DELETE | PRESERVE ) ROWS ]
  6094.  
  6095.   <view definition> ::=
  6096.       CREATE VIEW <table name> [ <left paren> <view column list>
  6097.                                     <right paren> ]
  6098.         AS <query expression>
  6099.         [ WITH [ <levels clause> ] CHECK OPTION ]
  6100.  
  6101.   <view column list> ::= <column name list>
  6102.  
  6103.   <levels clause> ::=
  6104.       CASCADED | LOCAL
  6105.  
  6106.   <grant statement> ::=
  6107.      GRANT <privileges> ON <object name>
  6108.        TO <grantee> [ ( <comma> <grantee> )... ]
  6109.          [ WITH GRANT OPTION ]
  6110.  
  6111.   <privileges> ::=
  6112.         ALL PRIVILEGES
  6113.       | <action list>
  6114.  
  6115.   <action list> ::= <action> [ ( <comma> <action> )... ]
  6116.  
  6117.   <action> ::=
  6118.         SELECT
  6119.       | DELETE
  6120.       | INSERT [ <left paren> <privilege column list> <right paren> ]
  6121.       | UPDATE [ <left paren> <privilege column list> <right paren> ]
  6122.       | REFERENCES [ <left paren> <privilege column list> <right paren> ]
  6123.       | USAGE
  6124.  
  6125.   <privilege column list> ::= <column name list>
  6126.  
  6127.   <object name> ::=
  6128.         [ TABLE ] <table name>
  6129.       | DOMAIN <domain name>
  6130.       | COLLATION <collation name>
  6131.       | CHARACTER SET <character set name>
  6132.       | TRANSLATION <translation name>
  6133.  
  6134.   <grantee> ::=
  6135.         PUBLIC
  6136.       | <authorization identifier>
  6137.  
  6138.   <assertion definition> ::=
  6139.       CREATE ASSERTION <constraint name> <assertion check>
  6140.         [ <constraint attributes> ]
  6141.  
  6142.   <assertion check> ::=
  6143.       CHECK
  6144.           <left paren> <search condition> <right paren>
  6145.  
  6146.   <character set definition> ::=
  6147.       CREATE CHARACTER SET <character set name>
  6148.           [ AS ]
  6149.         <character set source>
  6150.         [ <collate clause> | <limited collation definition> ]
  6151.  
  6152.   <character set source> ::=
  6153.         GET <existing character set name>
  6154.  
  6155.   <existing character set name> ::=
  6156.         <standard character repertoire name>
  6157.       | <implementation-defined character repertoire name>
  6158.       | <schema character set name>
  6159.  
  6160.   <schema character set name> ::= <character set name>
  6161.  
  6162.   <limited collation definition> ::=
  6163.       COLLATION FROM <collation source>
  6164.  
  6165.   <collation source> ::=
  6166.         <collating sequence definition>
  6167.       | <translation collation>
  6168.  
  6169.   <collating sequence definition> ::=
  6170.         <external collation>
  6171.       | <schema collation name>
  6172.       | DESC <left paren> <collation name> <right paren>
  6173.       | DEFAULT
  6174.  
  6175.   <external collation> ::=
  6176.       EXTERNAL <left paren> <quote> <external collation name> <quote> <right paren>
  6177.  
  6178.   <external collation name> ::=
  6179.         <standard collation name>
  6180.       | <implementation-defined collation name>
  6181.  
  6182.   <standard collation name> ::= <collation name>
  6183.  
  6184.   <implementation-defined collation name> ::= <collation name>
  6185.  
  6186.   <schema collation name> ::= <collation name>
  6187.  
  6188.   <translation collation> ::=
  6189.       TRANSLATION <translation name>
  6190.           [ THEN COLLATION <collation name> ]
  6191.  
  6192.   <collation definition> ::=
  6193.       CREATE COLLATION <collation name> FOR
  6194.           <character set specification>
  6195.         FROM <collation source>
  6196.           [ <pad attribute> ]
  6197.  
  6198.   <pad attribute> ::=
  6199.         NO PAD
  6200.       | PAD SPACE
  6201.  
  6202.   <translation definition> ::=
  6203.       CREATE TRANSLATION <translation name>
  6204.         FOR <source character set specification>
  6205.           TO <target character set specification>
  6206.         FROM <translation source>
  6207.  
  6208.   <source character set specification> ::= <character set specification>
  6209.  
  6210.   <target character set specification> ::= <character set specification>
  6211.  
  6212.   <translation source> ::=
  6213.         <translation specification>
  6214.  
  6215.   <translation specification> ::=
  6216.         <external translation>
  6217.       | IDENTITY
  6218.       | <schema translation name>
  6219.  
  6220.   <external translation> ::=
  6221.       EXTERNAL <left paren> <quote> <external translation name> <quote> <right paren>
  6222.  
  6223.   <external translation name> ::=
  6224.         <standard translation name>
  6225.       | <implementation-defined translation name>
  6226.  
  6227.   <standard translation name> ::= <translation name>
  6228.  
  6229.   <implementation-defined translation name> ::= <translation name>
  6230.  
  6231.   <schema translation name> ::= <translation name>
  6232.  
  6233.   <SQL schema manipulation statement> ::=
  6234.         <drop schema statement>
  6235.       | <alter table statement>
  6236.       | <drop table statement>
  6237.       | <drop view statement>
  6238.       | <revoke statement>
  6239.       | <alter domain statement>
  6240.       | <drop domain statement>
  6241.       | <drop character set statement>
  6242.       | <drop collation statement>
  6243.       | <drop translation statement>
  6244.       | <drop assertion statement>
  6245.  
  6246.   <drop schema statement> ::=
  6247.       DROP SCHEMA <schema name> <drop behavior>
  6248.  
  6249.   <drop behavior> ::= CASCADE | RESTRICT
  6250.  
  6251.   <alter table statement> ::=
  6252.       ALTER TABLE <table name> <alter table action>
  6253.  
  6254.   <alter table action> ::=
  6255.         <add column definition>
  6256.       | <alter column definition>
  6257.       | <drop column definition>
  6258.       | <add table constraint definition>
  6259.       | <drop table constraint definition>
  6260.  
  6261.   <add column definition> ::=
  6262.       ADD [ COLUMN ] <column definition>
  6263.  
  6264.   <alter column definition> ::=
  6265.       ALTER [ COLUMN ] <column name> <alter column action>
  6266.  
  6267.   <alter column action> ::=
  6268.         <set column default clause>
  6269.       | <drop column default clause>
  6270.  
  6271.   <set column default clause> ::=
  6272.       SET <default clause>
  6273.  
  6274.   <drop column default clause> ::=
  6275.       DROP DEFAULT
  6276.  
  6277.   <drop column definition> ::=
  6278.       DROP [ COLUMN ] <column name> <drop behavior>
  6279.  
  6280.   <add table constraint definition> ::=
  6281.       ADD <table constraint definition>
  6282.  
  6283.   <drop table constraint definition> ::=
  6284.       DROP CONSTRAINT <constraint name> <drop behavior>
  6285.  
  6286.   <drop table statement> ::=
  6287.       DROP TABLE <table name> <drop behavior>
  6288.  
  6289.   <drop view statement> ::=
  6290.       DROP VIEW <table name> <drop behavior>
  6291.  
  6292.   <revoke statement> ::=
  6293.       REVOKE [ GRANT OPTION FOR ]
  6294.           <privileges>
  6295.           ON <object name>
  6296.         FROM <grantee> [ ( <comma> <grantee> )... ] <drop behavior>
  6297.  
  6298.   <alter domain statement> ::=
  6299.       ALTER DOMAIN <domain name> <alter domain action>
  6300.  
  6301.   <alter domain action> ::=
  6302.         <set domain default clause>
  6303.       | <drop domain default clause>
  6304.       | <add domain constraint definition>
  6305.       | <drop domain constraint definition>
  6306.  
  6307.   <set domain default clause> ::= SET <default clause>
  6308.  
  6309.   <drop domain default clause> ::= DROP DEFAULT
  6310.  
  6311.   <add domain constraint definition> ::=
  6312.       ADD <domain constraint>
  6313.  
  6314.   <drop domain constraint definition> ::=
  6315.       DROP CONSTRAINT <constraint name>
  6316.  
  6317.   <drop domain statement> ::=
  6318.       DROP DOMAIN <domain name> <drop behavior>
  6319.  
  6320.   <drop character set statement> ::=
  6321.       DROP CHARACTER SET <character set name>
  6322.  
  6323.   <drop collation statement> ::=
  6324.       DROP COLLATION <collation name>
  6325.  
  6326.   <drop translation statement> ::=
  6327.       DROP TRANSLATION <translation name>
  6328.  
  6329.   <drop assertion statement> ::=
  6330.       DROP ASSERTION <constraint name>
  6331.  
  6332.   <SQL data statement> ::=
  6333.         <open statement>
  6334.       | <fetch statement>
  6335.       | <close statement>
  6336.       | <select statement: single row>
  6337.       | <SQL data change statement>
  6338.  
  6339.   <open statement> ::=
  6340.       OPEN <cursor name>
  6341.  
  6342.   <fetch statement> ::=
  6343.       FETCH [ [ <fetch orientation> ] FROM ]
  6344.         <cursor name> INTO <fetch target list>
  6345.  
  6346.   <fetch orientation> ::=
  6347.         NEXT
  6348.       | PRIOR
  6349.       | FIRST
  6350.       | LAST
  6351.       | ( ABSOLUTE | RELATIVE ) <simple value specification>
  6352.  
  6353.   <simple value specification> ::=
  6354.         <parameter name>
  6355.       | <embedded variable name>
  6356.       | <literal>
  6357.  
  6358.   <fetch target list> ::=
  6359.       <target specification> [ ( <comma> <target specification> )... ]
  6360.  
  6361.   <target specification> ::=
  6362.         <parameter specification>
  6363.       | <variable specification>
  6364.  
  6365.   <close statement> ::=
  6366.       CLOSE <cursor name>
  6367.  
  6368.   <select statement: single row> ::=
  6369.       SELECT [ <set quantifier> ] <select list>
  6370.         INTO <select target list>
  6371.           <table expression>
  6372.  
  6373.   <select target list> ::=
  6374.       <target specification> [ ( <comma> <target specification> )... ]
  6375.  
  6376.   <SQL data change statement> ::=
  6377.         <delete statement: positioned>
  6378.       | <delete statement: searched>
  6379.       | <insert statement>
  6380.       | <update statement: positioned>
  6381.       | <update statement: searched>
  6382.  
  6383.   <delete statement: positioned> ::=
  6384.       DELETE FROM <table name>
  6385.         WHERE CURRENT OF <cursor name>
  6386.  
  6387.   <delete statement: searched> ::=
  6388.       DELETE FROM <table name>
  6389.         [ WHERE <search condition> ]
  6390.  
  6391.   <insert statement> ::=
  6392.       INSERT INTO <table name>
  6393.         <insert columns and source>
  6394.  
  6395.   <insert columns and source> ::=
  6396.         [ <left paren> <insert column list> <right paren> ]
  6397.               <query expression>
  6398.       | DEFAULT VALUES
  6399.  
  6400.   <insert column list> ::= <column name list>
  6401.  
  6402.   <update statement: positioned> ::=
  6403.       UPDATE <table name>
  6404.         SET <set clause list>
  6405.           WHERE CURRENT OF <cursor name>
  6406.  
  6407.   <set clause list> ::=
  6408.       <set clause> [ ( <comma> <set clause> )... ]
  6409.  
  6410.   <set clause> ::=
  6411.       <object column> <equals operator> <update source>
  6412.  
  6413.   <object column> ::= <column name>
  6414.  
  6415.   <update source> ::=
  6416.         <value expression>
  6417.       | <null specification>
  6418.       | DEFAULT
  6419.  
  6420.   <update statement: searched> ::=
  6421.       UPDATE <table name>
  6422.         SET <set clause list>
  6423.         [ WHERE <search condition> ]
  6424.  
  6425.   <SQL transaction statement> ::=
  6426.         <set transaction statement>
  6427.       | <set constraints mode statement>
  6428.       | <commit statement>
  6429.       | <rollback statement>
  6430.  
  6431.   <set transaction statement> ::=
  6432.       SET TRANSACTION <transaction mode>
  6433.           [ ( <comma> <transaction mode> )... ]
  6434.  
  6435.   <transaction mode> ::=
  6436.         <isolation level>
  6437.       | <transaction access mode>
  6438.       | <diagnostics size>
  6439.  
  6440.   <isolation level> ::=
  6441.       ISOLATION LEVEL <level of isolation>
  6442.  
  6443.   <level of isolation> ::=
  6444.         READ UNCOMMITTED
  6445.       | READ COMMITTED
  6446.       | REPEATABLE READ
  6447.       | SERIALIZABLE
  6448.  
  6449.   <transaction access mode> ::=
  6450.         READ ONLY
  6451.       | READ WRITE
  6452.  
  6453.   <diagnostics size> ::=
  6454.       DIAGNOSTICS SIZE <number of conditions>
  6455.  
  6456.   <number of conditions> ::= <simple value specification>
  6457.  
  6458.   <set constraints mode statement> ::=
  6459.       SET CONSTRAINTS <constraint name list>
  6460.           ( DEFERRED | IMMEDIATE )
  6461.  
  6462.   <constraint name list> ::=
  6463.         ALL
  6464.       | <constraint name> [ ( <comma> <constraint name> )... ]
  6465.  
  6466.   <commit statement> ::=
  6467.       COMMIT [ WORK ]
  6468.  
  6469.   <rollback statement> ::=
  6470.       ROLLBACK [ WORK ]
  6471.  
  6472.   <SQL connection statement> ::=
  6473.         <connect statement>
  6474.       | <set connection statement>
  6475.       | <disconnect statement>
  6476.  
  6477.   <connect statement> ::=
  6478.       CONNECT TO <connection target>
  6479.  
  6480.   <connection target> ::=
  6481.         <SQL-server name>
  6482.           [ AS <connection name> ]
  6483.             correspondence with Tony Gordon)
  6484.           [ USER <user name> ]
  6485.       | DEFAULT
  6486.  
  6487.   <SQL-server name> ::= <simple value specification>
  6488.  
  6489.   <connection name> ::= <simple value specification>
  6490.  
  6491.   <user name> ::= <simple value specification>
  6492.  
  6493.   <set connection statement> ::=
  6494.       SET CONNECTION <connection object>
  6495.  
  6496.   <connection object> ::=
  6497.         DEFAULT
  6498.       | <connection name>
  6499.  
  6500.   <disconnect statement> ::=
  6501.       DISCONNECT <disconnect object>
  6502.  
  6503.   <disconnect object> ::=
  6504.         <connection object>
  6505.       | ALL
  6506.       | CURRENT
  6507.  
  6508.   <SQL session statement> ::=
  6509.         <set catalog statement>
  6510.       | <set schema statement>
  6511.       | <set names statement>
  6512.       | <set session authorization identifier statement>
  6513.       | <set local time zone statement>
  6514.  
  6515.   <set catalog statement> ::=
  6516.       SET CATALOG <value specification>
  6517.  
  6518.   <value specification> ::=
  6519.         <literal>
  6520.       | <general value specification>
  6521.  
  6522.   <set schema statement> ::=
  6523.       SET SCHEMA <value specification>
  6524.  
  6525.   <set names statement> ::=
  6526.       SET NAMES <value specification>
  6527.  
  6528.   <set session authorization identifier statement> ::=
  6529.       SET SESSION AUTHORIZATION
  6530.           <value specification>
  6531.  
  6532.   <set local time zone statement> ::=
  6533.       SET TIME ZONE
  6534.           <set time zone value>
  6535.   <set time zone value> ::=
  6536.         <interval value expression>
  6537.       | LOCAL
  6538.  
  6539.   <SQL dynamic statement> ::=
  6540.         <system descriptor statement>
  6541.       | <prepare statement>
  6542.       | <deallocate prepared statement>
  6543.       | <describe statement>
  6544.       | <execute statement>
  6545.       | <execute immediate statement>
  6546.       | <SQL dynamic data statement>
  6547.  
  6548.   <system descriptor statement> ::=
  6549.         <allocate descriptor statement>
  6550.       | <deallocate descriptor statement>
  6551.       | <set descriptor statement>
  6552.       | <get descriptor statement>
  6553.  
  6554.   <allocate descriptor statement> ::=
  6555.       ALLOCATE DESCRIPTOR <descriptor name>
  6556.          [ WITH MAX <occurrences> ]
  6557.  
  6558.   <descriptor name> ::=
  6559.       [ <scope option> ] <simple value specification>
  6560.  
  6561.   <scope option> ::=
  6562.         GLOBAL
  6563.       | LOCAL
  6564.  
  6565.   <occurrences> ::= <simple value specification>
  6566.  
  6567.   <deallocate descriptor statement> ::=
  6568.       DEALLOCATE DESCRIPTOR <descriptor name>
  6569.  
  6570.   <set descriptor statement> ::=
  6571.       SET DESCRIPTOR <descriptor name>
  6572.           <set descriptor information>
  6573.  
  6574.   <set descriptor information> ::=
  6575.         <set count>
  6576.       | VALUE <item number>
  6577.           <set item information> [ ( <comma> <set item information> )... ]
  6578.  
  6579.   <set count> ::=
  6580.       COUNT <equals operator> <simple value specification 1>
  6581.  
  6582.   <simple value specification 1> ::= <simple value specification>
  6583.  
  6584.   <item number> ::= <simple value specification>
  6585.  
  6586.   <set item information> ::=
  6587.       <descriptor item name> <equals operator> <simple value specification 2>
  6588.  
  6589.   <descriptor item name> ::=
  6590.         TYPE
  6591.       | LENGTH
  6592.       | OCTET_LENGTH
  6593.       | RETURNED_LENGTH
  6594.       | RETURNED_OCTET_LENGTH
  6595.       | PRECISION
  6596.       | SCALE
  6597.       | DATETIME_INTERVAL_CODE
  6598.       | DATETIME_INTERVAL_PRECISION
  6599.       | NULLABLE
  6600.       | INDICATOR
  6601.       | DATA
  6602.       | NAME
  6603.       | UNNAMED
  6604.       | COLLATION_CATALOG
  6605.       | COLLATION_SCHEMA
  6606.       | COLLATION_NAME
  6607.       | CHARACTER_SET_CATALOG
  6608.       | CHARACTER_SET_SCHEMA
  6609.       | CHARACTER_SET_NAME
  6610.  
  6611.   <simple value specification 2> ::= <simple value specification>
  6612.  
  6613.   <item number> ::= <simple value specification>
  6614.  
  6615.   <get descriptor statement> ::=
  6616.       GET DESCRIPTOR <descriptor name> <get descriptor information>
  6617.  
  6618.   <get descriptor information> ::=
  6619.         <get count>
  6620.       | VALUE <item number>
  6621.           <get item information> [ ( <comma> <get item information> )... ]
  6622.  
  6623.   <get count> ::=
  6624.       <simple target specification 1> <equals operator>
  6625.            COUNT
  6626.  
  6627.   <simple target specification 1> ::= <simple target specification>
  6628.  
  6629.   <simple target specification> ::=
  6630.         <parameter name>
  6631.       | <embedded variable name>
  6632.  
  6633.   <get item information> ::=
  6634.       <simple target specification 2> <equals operator> <descriptor item name>>
  6635.  
  6636.   <simple target specification 2> ::= <simple target specification>
  6637.  
  6638.   <prepare statement> ::=
  6639.       PREPARE <SQL statement name> FROM <SQL statement variable>
  6640.  
  6641.   <SQL statement name> ::=
  6642.         <statement name>
  6643.       | <extended statement name>
  6644.  
  6645.   <extended statement name> ::=
  6646.       [ <scope option> ] <simple value specification>
  6647.  
  6648.   <SQL statement variable> ::= <simple value specification>
  6649.  
  6650.   <deallocate prepared statement> ::=
  6651.       DEALLOCATE PREPARE <SQL statement name>
  6652.  
  6653.   <describe statement> ::=
  6654.         <describe input statement>
  6655.       | <describe output statement>
  6656.  
  6657.   <describe input statement> ::=
  6658.       DESCRIBE INPUT <SQL statement name> <using descriptor>
  6659.  
  6660.   <using descriptor> ::=
  6661.       ( USING | INTO ) SQL DESCRIPTOR <descriptor name>
  6662.  
  6663.   <describe output statement> ::=
  6664.       DESCRIBE [ OUTPUT ] <SQL statement name> <using descriptor>
  6665.  
  6666.   <execute statement> ::=
  6667.       EXECUTE <SQL statement name>
  6668.         [ <result using clause> ]
  6669.         [ <parameter using clause> ]
  6670.  
  6671.   <result using clause> ::= <using clause>
  6672.  
  6673.   <using clause> ::=
  6674.         <using arguments>
  6675.       | <using descriptor>
  6676.  
  6677.   <using arguments> ::=
  6678.       ( USING | INTO ) <argument> [ ( <comma> <argument> )... ]
  6679.  
  6680.   <argument> ::= <target specification>
  6681.  
  6682.   <parameter using clause> ::= <using clause>
  6683.  
  6684.   <execute immediate statement> ::=
  6685.       EXECUTE IMMEDIATE <SQL statement variable>
  6686.  
  6687.   <SQL dynamic data statement> ::=
  6688.         <allocate cursor statement>
  6689.       | <dynamic open statement>
  6690.       | <dynamic fetch statement>
  6691.       | <dynamic close statement>
  6692.       | <dynamic delete statement: positioned>
  6693.       | <dynamic update statement: positioned>
  6694.  
  6695.   <allocate cursor statement> ::=
  6696.       ALLOCATE <extended cursor name> [ INSENSITIVE ]
  6697.           [ SCROLL ] CURSOR
  6698.         FOR <extended statement name>
  6699.  
  6700.   <extended cursor name> ::=
  6701.       [ <scope option> ] <simple value specification>
  6702.  
  6703.   <dynamic open statement> ::=
  6704.       OPEN <dynamic cursor name> [ <using clause> ]
  6705.  
  6706.   <dynamic cursor name> ::=
  6707.         <cursor name>
  6708.       | <extended cursor name>
  6709.  
  6710.   <dynamic fetch statement> ::=
  6711.       FETCH [ [ <fetch orientation> ] FROM ] <dynamic cursor name>
  6712.           <using clause>
  6713.  
  6714.   <dynamic close statement> ::=
  6715.       CLOSE <dynamic cursor name>
  6716.  
  6717.   <dynamic delete statement: positioned> ::=
  6718.       DELETE FROM <table name>
  6719.         WHERE CURRENT OF
  6720.             <dynamic cursor name>
  6721.  
  6722.   <dynamic update statement: positioned> ::=
  6723.       UPDATE <table name>
  6724.         SET <set clause>
  6725.             [ ( <comma> <set clause> )... ]
  6726.           WHERE CURRENT OF
  6727.               <dynamic cursor name>
  6728.  
  6729.   <SQL diagnostics statement> ::=
  6730.       <get diagnostics statement>
  6731.  
  6732.   <get diagnostics statement> ::=
  6733.       GET DIAGNOSTICS <sql diagnostics information>
  6734.  
  6735.   <sql diagnostics information> ::=
  6736.         <statement information>
  6737.       | <condition information>
  6738.  
  6739.   <statement information> ::=
  6740.       <statement information item> [ ( <comma> <statement information item> )... ]
  6741.  
  6742.   <statement information item> ::=
  6743.       <simple target specification> <equals operator> <statement information item name>
  6744.  
  6745.   <statement information item name> ::=
  6746.         NUMBER
  6747.       | MORE
  6748.       | COMMAND_FUNCTION
  6749.       | DYNAMIC_FUNCTION
  6750.       | ROW_COUNT
  6751.  
  6752.   <condition information> ::=
  6753.       EXCEPTION <condition number>
  6754.         <condition information item> [ ( <comma> <condition information item> )... ]
  6755.  
  6756.   <condition number> ::= <simple value specification>
  6757.  
  6758.   <condition information item> ::=
  6759.       <simple target specification> <equals operator> <condition information item name>
  6760.  
  6761.   <condition information item name> ::=
  6762.         CONDITION_NUMBER
  6763.       | RETURNED_SQLSTATE
  6764.       | CLASS_ORIGIN
  6765.       | SUBCLASS_ORIGIN
  6766.       | SERVER_NAME
  6767.       | CONNECTION_NAME
  6768.       | CONSTRAINT_CATALOG
  6769.       | CONSTRAINT_SCHEMA
  6770.       | CONSTRAINT_NAME
  6771.       | CATALOG_NAME
  6772.       | SCHEMA_NAME
  6773.       | TABLE_NAME
  6774.       | COLUMN_NAME
  6775.       | CURSOR_NAME
  6776.       | MESSAGE_TEXT
  6777.       | MESSAGE_LENGTH
  6778.       | MESSAGE_OCTET_LENGTH
  6779.  
  6780.   <embedded SQL host program> ::=
  6781.         <embedded SQL Ada program>
  6782.       | <embedded SQL C program>
  6783.       | <embedded SQL COBOL program>
  6784.       | <embedded SQL Fortran program>
  6785.       | <embedded SQL MUMPS program>
  6786.       | <embedded SQL Pascal program>
  6787.       | <embedded SQL PL/I program>
  6788.  
  6789.   <embedded SQL Ada program> ::= !! <EMPHASIS>(See the Syntax Rules.)
  6790.  
  6791.   <embedded SQL C program> ::=
  6792.         !! <EMPHASIS>(See the Syntax Rules.)
  6793.  
  6794.   <embedded SQL COBOL program> ::= !! <EMPHASIS>(See the Syntax Rules.)
  6795.  
  6796.   <embedded SQL Fortran program> ::=
  6797.       !! <EMPHASIS>(See the Syntax Rules.)
  6798.  
  6799.   <embedded SQL MUMPS program> ::= !! <EMPHASIS>(See the Syntax Rules.)
  6800.  
  6801.   <embedded SQL Pascal program> ::=
  6802.       !! <EMPHASIS>(See the Syntax Rules.)
  6803.  
  6804.   <embedded SQL PL/I program> ::= !! <EMPHASIS>(See the Syntax Rules.)
  6805.  
  6806.   <embedded SQL declare section> ::=
  6807.         <embedded SQL begin declare>
  6808.           [ <embedded character set declaration> ]
  6809.           [ <host variable definition>... ]
  6810.         <embedded SQL end declare>
  6811.       | <embedded SQL MUMPS declare>
  6812.  
  6813.   <embedded SQL begin declare> ::=
  6814.       <SQL prefix> BEGIN DECLARE SECTION
  6815.           [ <SQL terminator> ]
  6816.  
  6817.   <SQL prefix> ::=
  6818.         EXEC SQL
  6819.       | <ampersand>SQL<left paren>
  6820.  
  6821.   <SQL terminator> ::=
  6822.         END-EXEC
  6823.       | <semicolon>
  6824.       | <right paren>
  6825.  
  6826.   <embedded character set declaration> ::=
  6827.       SQL NAMES ARE <character set specification>
  6828.  
  6829.   <host variable definition> ::=
  6830.         <Ada variable definition>
  6831.       | <C variable definition>
  6832.       | <COBOL variable definition>
  6833.       | <Fortran variable definition>
  6834.       | <MUMPS variable definition>
  6835.       | <Pascal variable definition>
  6836.       | <PL/I variable definition>
  6837.  
  6838.   <Ada variable definition> ::=
  6839.       <Ada host identifier> [ ( <comma> <Ada host identifier> )... ] :
  6840.       <Ada type specification> [ <Ada initial value> ]
  6841.  
  6842.   <Ada type specification> ::=
  6843.         <Ada qualified type specification>
  6844.       | <Ada unqualified type specification>
  6845.  
  6846.   <Ada qualified type specification> ::=
  6847.         SQL_STANDARD.CHAR [ CHARACTER SET
  6848.            [ IS ] <character set specification> ]
  6849.             <left paren> 1 <double period> <length> <right paren>
  6850.       | SQL_STANDARD.BIT
  6851.             <left paren> 1 <double period> <length> <right paren>
  6852.       | SQL_STANDARD.SMALLINT
  6853.       | SQL_STANDARD.INT
  6854.       | SQL_STANDARD.REAL
  6855.       | SQL_STANDARD.DOUBLE_PRECISION
  6856.       | SQL_STANDARD.SQLCODE_TYPE
  6857.       | SQL_STANDARD.SQLSTATE_TYPE
  6858.       | SQL_STANDARD.INDICATOR_TYPE
  6859.  
  6860.   <Ada unqualified type specification> ::=
  6861.         CHAR
  6862.             <left paren> 1 <double period> <length> <right paren>
  6863.       | BIT
  6864.             <left paren> 1 <double period> <length> <right paren>
  6865.       | SMALLINT
  6866.       | INT
  6867.       | REAL
  6868.       | DOUBLE_PRECISION
  6869.       | SQLCODE_TYPE
  6870.       | SQLSTATE_TYPE
  6871.       | INDICATOR_TYPE
  6872.  
  6873.   <Ada initial value> ::=
  6874.       <Ada assignment operator> <character representation>...
  6875.  
  6876.   <Ada assignment operator> ::= <colon><equals operator>
  6877.  
  6878.   <C variable definition> ::=
  6879.         [ <C storage class> ]
  6880.         [ <C class modifier> ]
  6881.         <C variable specification>
  6882.       <semicolon>
  6883.  
  6884.   <C storage class> ::=
  6885.         auto
  6886.       | extern
  6887.       | static
  6888.  
  6889.   <C class modifier> ::= const | volatile
  6890.  
  6891.   <C variable specification> ::=
  6892.         <C numeric variable>
  6893.       | <C character variable>
  6894.       | <C derived variable>
  6895.  
  6896.   <C numeric variable> ::=
  6897.       ( long | short | float | double )
  6898.         <C host identifier> [ <C initial value> ]
  6899.               [ ( <comma> <C host identifier> [ <C initial value> ] )... ]
  6900.  
  6901.   <C initial value> ::=
  6902.       <equals operator> <character representation>...
  6903.  
  6904.   <C character variable> ::=
  6905.       char [ CHARACTER SET
  6906.                [ IS ] <character set specification> ]
  6907.         <C host identifier>
  6908.           <C array specification> [ <C initial value> ]
  6909.           [ ( <comma> <C host identifier>
  6910.             <C array specification>
  6911.                    [ <C initial value> ] )... ]
  6912.  
  6913.   <C array specification> ::=
  6914.       <left bracket> <length> <right bracket>
  6915.  
  6916.   <C derived variable> ::=
  6917.         <C VARCHAR variable>
  6918.       | <C bit variable>
  6919.  
  6920.   <C VARCHAR variable> ::=
  6921.       VARCHAR [ CHARACTER SET [ IS ]
  6922.           <character set specification> ]
  6923.           <C host identifier>
  6924.               <C array specification> [ <C initial value> ]
  6925.             [ ( <comma> <C host identifier>
  6926.                 <C array specification>
  6927.                         [ <C initial value> ] )... ]
  6928.  
  6929.   <C bit variable> ::=
  6930.       BIT <C host identifier>
  6931.           <C array specification> [ <C initial value> ]
  6932.         [ ( <comma> <C host identifier>
  6933.           <C array specification>
  6934.                      [ <C initial value> ] )... ]
  6935.  
  6936.   <COBOL variable definition> ::=
  6937.       (01|77) <COBOL host identifier> <COBOL type specification>
  6938.         [ <character representation>... ] <period>
  6939.  
  6940.   <COBOL type specification> ::=
  6941.         <COBOL character type>
  6942.       | <COBOL bit type>
  6943.       | <COBOL numeric type>
  6944.       | <COBOL integer type>
  6945.  
  6946.   <COBOL character type> ::=
  6947.       [ CHARACTER SET [ IS ]
  6948.             <character set specification> ]
  6949.       ( PIC | PICTURE ) [ IS ] ( X [ <left paren> <length> <right paren> ] )...
  6950.  
  6951.   <COBOL bit type> ::=
  6952.       ( PIC | PICTURE ) [ IS ]
  6953.           ( B [ <left paren> <length> <right paren> ] )...
  6954.  
  6955.   <COBOL numeric type> ::=
  6956.       ( PIC | PICTURE ) [ IS ]
  6957.         S <COBOL nines specification>
  6958.       [ USAGE [ IS ] ] DISPLAY SIGN LEADING SEPARATE
  6959.  
  6960.   <COBOL nines specification> ::=
  6961.         <COBOL nines> [ V [ <COBOL nines> ] ]
  6962.       | V <COBOL nines>
  6963.  
  6964.   <COBOL nines> ::= ( 9 [ <left paren> <length> <right paren> ] )...
  6965.  
  6966.   <COBOL integer type> ::=
  6967.         <COBOL computational integer>
  6968.       | <COBOL binary integer>
  6969.  
  6970.   <COBOL computational integer> ::=
  6971.       ( PIC | PICTURE ) [ IS ] S<COBOL nines>
  6972.         [ USAGE [ IS ] ] ( COMP | COMPUTATIONAL )
  6973.  
  6974.   <COBOL binary integer> ::=
  6975.       ( PIC | PICTURE ) [ IS ] S<COBOL nines>
  6976.         [ USAGE [ IS ] ] BINARY
  6977.  
  6978.   <Fortran variable definition> ::=
  6979.       <Fortran type specification>
  6980.       <Fortran host identifier>
  6981.           [ ( <comma> <Fortran host identifier> )... ]
  6982.  
  6983.   <Fortran type specification> ::=
  6984.         CHARACTER [ <asterisk> <length> ]
  6985.             [ CHARACTER SET [ IS ]
  6986.                   <character set specification> ]
  6987.       | BIT [ <asterisk> <length> ]
  6988.       | INTEGER
  6989.       | REAL
  6990.       | DOUBLE PRECISION
  6991.  
  6992.   <MUMPS variable definition> ::=
  6993.       ( <MUMPS numeric variable> | <MUMPS character variable> )
  6994.           <semicolon>
  6995.  
  6996.   <MUMPS numeric variable> ::=
  6997.       <MUMPS type specification>
  6998.         <MUMPS host identifier> [ ( <comma> <MUMPS host identifier> )... ]
  6999.  
  7000.   <MUMPS type specification> ::=
  7001.         INT
  7002.       | DEC
  7003.             [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
  7004.       | REAL
  7005.  
  7006.   <MUMPS character variable> ::=
  7007.       VARCHAR <MUMPS host identifier> <MUMPS length specification>
  7008.         [ ( <comma> <MUMPS host identifier> <MUMPS length specification> )... ]
  7009.  
  7010.   <MUMPS length specification> ::=
  7011.       <left paren> <length> <right paren>
  7012.  
  7013.   <Pascal variable definition> ::=
  7014.       <Pascal host identifier> [ ( <comma> <Pascal host identifier> )... ] <colon>
  7015.         <Pascal type specification> <semicolon>
  7016.  
  7017.   <Pascal type specification> ::=
  7018.         PACKED ARRAY
  7019.             <left bracket> 1 <double period> <length> <right bracket>
  7020.           OF CHAR
  7021.             [ CHARACTER SET [ IS ]
  7022.                   <character set specification> ]
  7023.       | PACKED ARRAY
  7024.             <left bracket> 1 <double period> <length> <right bracket>
  7025.           OF BIT
  7026.       | INTEGER
  7027.       | REAL
  7028.       | CHAR [ CHARACTER SET
  7029.                                   [ IS ] <character set specification> ]
  7030.       | BIT
  7031.  
  7032.   <PL/I variable definition> ::=
  7033.       (DCL | DECLARE)
  7034.           (   <PL/I host identifier>
  7035.             | <left paren> <PL/I host identifier>
  7036.                   [ ( <comma> <PL/I host identifier> )... ] <right paren> )
  7037.       <PL/I type specification>
  7038.       [ <character representation>... ] <semicolon>
  7039.  
  7040.   <PL/I type specification> ::=
  7041.         ( CHAR | CHARACTER ) [ VARYING ]
  7042.             <left paren><length><right paren>
  7043.             [ CHARACTER SET
  7044.                   [ IS ] <character set specification> ]
  7045.       | BIT [ VARYING ] <left paren><length><right paren>
  7046.       | <PL/I type fixed decimal> <left paren> <precision>
  7047.             [ <comma> <scale> ] <right paren>
  7048.       | <PL/I type fixed binary> [ <left paren> <precision> <right paren> ]
  7049.       | <PL/I type float binary> <left paren> <precision> <right paren>
  7050.  
  7051.   <PL/I type fixed decimal> ::=
  7052.         ( DEC | DECIMAL ) FIXED
  7053.       | FIXED ( DEC | DECIMAL )
  7054.  
  7055.   <PL/I type fixed binary> ::=
  7056.         ( BIN | BINARY ) FIXED
  7057.       | FIXED ( BIN | BINARY )
  7058.  
  7059.   <PL/I type float binary> ::=
  7060.         ( BIN | BINARY ) FLOAT
  7061.       | FLOAT ( BIN | BINARY )
  7062.  
  7063.   <embedded SQL end declare> ::=
  7064.       <SQL prefix> END DECLARE SECTION
  7065.           [ <SQL terminator> ]
  7066.  
  7067.   <embedded SQL MUMPS declare> ::=
  7068.       <SQL prefix>
  7069.         BEGIN DECLARE SECTION
  7070.           [ <embedded character set declaration> ]
  7071.           [ <host variable definition>... ]
  7072.         END DECLARE SECTION
  7073.       <SQL terminator>
  7074.  
  7075.   <embedded SQL statement> ::=
  7076.       <SQL prefix>
  7077.         <statement or declaration>
  7078.       [ <SQL terminator> ]
  7079.  
  7080.   <statement or declaration> ::=
  7081.         <declare cursor>
  7082.       | <dynamic declare cursor>
  7083.       | <temporary table declaration>
  7084.       | <embedded exception declaration>
  7085.       | <SQL procedure statement>
  7086.  
  7087.   <embedded exception declaration> ::=
  7088.       WHENEVER <condition> <condition action>
  7089.  
  7090.   <condition> ::=
  7091.       SQLERROR | NOT FOUND
  7092.  
  7093.   <condition action> ::=
  7094.       CONTINUE | <go to>
  7095.  
  7096.   <go to> ::=
  7097.       ( GOTO | GO TO ) <goto target>
  7098.  
  7099.   <goto target> ::=
  7100.         <host label identifier>
  7101.       | <unsigned integer>
  7102.       | <host PL/I label variable>
  7103.  
  7104.   <host label identifier> ::= !!<EMPHASIS>(See the Syntax Rules.)
  7105.  
  7106.   <host PL/I label variable> ::= !!<EMPHASIS>(See the Syntax Rules.)
  7107.  
  7108.   <preparable statement> ::=
  7109.         <preparable SQL data statement>
  7110.       | <preparable SQL schema statement>
  7111.       | <preparable SQL transaction statement>
  7112.       | <preparable SQL session statement>
  7113.       | <preparable implementation-defined statement>
  7114.  
  7115.   <preparable SQL data statement> ::=
  7116.         <delete statement: searched>
  7117.       | <dynamic single row select statement>
  7118.       | <insert statement>
  7119.       | <dynamic select statement>
  7120.       | <update statement: searched>
  7121.       | <preparable dynamic delete statement: positioned>
  7122.       | <preparable dynamic update statement: positioned>
  7123.  
  7124.   <dynamic single row select statement> ::= <query specification>
  7125.  
  7126.   <dynamic select statement> ::= <cursor specification>
  7127.  
  7128.   <preparable dynamic delete statement: positioned> ::=
  7129.      DELETE [ FROM <table name> ]
  7130.         WHERE CURRENT OF <cursor name>
  7131.  
  7132.   <preparable dynamic update statement: positioned> ::=
  7133.      UPDATE [ <table name> ]
  7134.         SET <set clause list>
  7135.         WHERE CURRENT OF <cursor name>
  7136.  
  7137.   <preparable SQL schema statement> ::=
  7138.         <SQL schema statement>
  7139.  
  7140.   <preparable SQL transaction statement> ::=
  7141.         <SQL transaction statement>
  7142.  
  7143.   <preparable SQL session statement> ::=
  7144.         <SQL session statement>
  7145.  
  7146.   <preparable implementation-defined statement> ::=
  7147.       !! <EMPHASIS>(See the Syntax Rules.)
  7148.  
  7149.   <direct SQL statement> ::=
  7150.       <directly executable statement> <semicolon>
  7151.  
  7152.   <directly executable statement> ::=
  7153.         <direct SQL data statement>
  7154.       | <SQL schema statement>
  7155.       | <SQL transaction statement>
  7156.       | <SQL connection statement>
  7157.       | <SQL session statement>
  7158.       | <direct implementation-defined statement>
  7159.  
  7160.   <direct SQL data statement> ::=
  7161.         <delete statement: searched>
  7162.       | <direct select statement: multiple rows>
  7163.       | <insert statement>
  7164.       | <update statement: searched>
  7165.       | <temporary table declaration>
  7166.  
  7167.   <direct select statement: multiple rows> ::=
  7168.       <query expression> [ <order by clause> ]
  7169.  
  7170.   <direct implementation-defined statement> ::=
  7171.       !!<EMPHASIS>(See the Syntax Rules)
  7172.  
  7173.   <SQL object identifier> ::=
  7174.       <SQL provenance> <SQL variant>
  7175.  
  7176.   <SQL provenance> ::= <arc1> <arc2> <arc3>
  7177.  
  7178.   <arc1> ::= iso | 1 | iso <left paren> 1 <right paren>
  7179.  
  7180.   <arc2> ::= standard | 0 | standard <left paren> 0 <right paren>
  7181.  
  7182.   <arc3> ::= 9075
  7183.  
  7184.   <SQL variant> ::= <SQL edition> <SQL conformance>
  7185.  
  7186.   <SQL edition> ::= <1987> | <1989> | <1992>
  7187.  
  7188.   <1987> ::= 0 | edition1987 <left paren> 0 <right paren>
  7189.  
  7190.   <1989> ::= <1989 base> <1989 package>
  7191.  
  7192.   <1989 base> ::= 1 | edition1989 <left paren> 1 <right paren>
  7193.  
  7194.   <1989 package> ::= <integrity no> | <integrity yes>
  7195.   <integrity no> ::= 0 | IntegrityNo <left paren> 0 <right paren>
  7196.  
  7197.   <integrity yes> ::= 1 | IntegrityYes <left paren> 1 <right paren>
  7198.  
  7199.   <1992> ::= 2 | edition1992 <left paren> 2 <right paren>
  7200.  
  7201.   <SQL conformance> ::= <low> | <intermediate> | <high>
  7202.  
  7203.   <low> ::= 0 | Low <left paren> 0 <right paren>
  7204.  
  7205.   <intermediate> ::= 1 | Intermediate <left paren> 1 <right paren>
  7206.  
  7207.   <high> ::= 2 | High <left paren> 2 <right paren>
  7208.  
  7209.  
  7210.  
  7211.  
  7212.   AF.  Appendix B - SQL Tutorial for beginners
  7213.  
  7214.  
  7215.   AF.1.  Tutorial for PostgreSQL
  7216.  
  7217.   SQL tutorial is also distributed with PostgreSQL. The SQL tutorial
  7218.   scripts is in the directory src/tutorial
  7219.  
  7220.   AF.2.  Internet URL pointers
  7221.  
  7222.   The SQL tutorial for beginners can be found at
  7223.  
  7224.   ╖  <http://w3.one.net/~jhoffman/sqltut.htm>
  7225.  
  7226.      Comments or suggestions? Mail to
  7227.  
  7228.   ╖  Jim Hoffman jhoffman@one.net
  7229.  
  7230.      The following are the sites suggested by John Hoffman:
  7231.  
  7232.   ╖  SQL Reference  <http://www.contrib.andrew.cmu.edu/~shadow/sql.html>
  7233.  
  7234.   ╖  Ask the SQL Pro  <http://www.inquiry.com/techtips/thesqlpro/>
  7235.  
  7236.   ╖  SQL Pro's Relational DB Useful Sites
  7237.      <http://www.inquiry.com/techtips/thesqlpro/usefulsites.html>
  7238.  
  7239.   ╖  Programmer's Source  <http://infoweb.magi.com/~steve/develop.html>
  7240.  
  7241.   ╖  DBMS Sites  <http://info.itu.ch/special/wwwfiles> Go here and see
  7242.      file comp_db.html
  7243.  
  7244.   ╖  DB Ingredients  <http://www.compapp.dcu.ie/databases/f017.html>
  7245.  
  7246.   ╖  Web Authoring  <http://www.stars.com/Tutorial/CGI/>
  7247.  
  7248.   ╖  Computing Dictionary  <http://wfn-shop.princeton.edu/cgi-
  7249.      bin/foldoc>
  7250.  
  7251.   ╖  DBMS Lab/Links  <http://www-ccs.cs.umass.edu/db.html>
  7252.  
  7253.   ╖  SQL FAQ
  7254.      <http://epoch.CS.Berkeley.EDU:8000/sequoia/dba/montage/FAQ> Go here
  7255.      and see file SQL_TOC.html
  7256.  
  7257.   ╖  SQL Databases  <http://chaos.mur.csu.edu.au/itc125/cgi/sqldb.html>
  7258.  
  7259.   ╖  RIT Database Design Page
  7260.      <http://www.it.rit.edu/~wjs/IT/199602/icsa720/icsa720postings.html>
  7261.   ╖  Database Jump Site  <http://www.pcslink.com/~ej/dbweb.html>
  7262.  
  7263.   ╖  Programming Tutorials on the Web
  7264.      <http://www.eng.uc.edu/~jtilley/tutorial.html>
  7265.  
  7266.   ╖  Development Resources
  7267.      <http://www.ndev.com/ndc2/support/resources.htp>
  7268.  
  7269.   ╖  Query List  <http://ashok.pair.com/sql.htm>
  7270.  
  7271.   ╖  IMAGE SQL Miscellaneous
  7272.      <http://jazz.external.hp.com/training/sqltables/main.html>
  7273.  
  7274.   ╖  Internet Resource List  <http://www.eit.com/web/netservices.html>
  7275.  
  7276.  
  7277.  
  7278.  
  7279.  
  7280.  
  7281.  
  7282.  
  7283.  
  7284.  
  7285.  
  7286.  
  7287.  
  7288.  
  7289.  
  7290.  
  7291.  
  7292.  
  7293.  
  7294.  
  7295.  
  7296.  
  7297.  
  7298.  
  7299.  
  7300.  
  7301.  
  7302.  
  7303.  
  7304.  
  7305.  
  7306.  
  7307.  
  7308.  
  7309.  
  7310.  
  7311.  
  7312.  
  7313.  
  7314.  
  7315.  
  7316.  
  7317.  
  7318.  
  7319.  
  7320.  
  7321.  
  7322.  
  7323.  
  7324.  
  7325.  
  7326.  
  7327.