r10383: 06 Apr 2005 Kevin Rosenberg <kevin@rosenberg.net>
[clsql.git] / doc / appendix.xml
index 8ba1baf6eb59b43091e4c8709a66822fc938649c..c8ce4bb3e0b85ca44a4ee444dcc8baac741a0bd0 100644 (file)
@@ -12,7 +12,7 @@
       <title>PostgreSQL</title>
       <sect2>
        <title>Libraries</title>
-       <para>The PostgreSQL back-end needs access to the PostgreSQL C 
+       <para>The PostgreSQL back-end requires the PostgreSQL C 
          client library (<filename>libpq.so</filename>).  The
          location of this library is specified via 
          <symbol>*postgresql-so-load-path*</symbol>, which defaults
@@ -25,7 +25,7 @@
        <title>Initialization</title>
        <para>Use 
          <screen>
-(asdf:operate 'adsf:load-op 'clsql-postgresql)
+(asdf:operate 'asdf:load-op 'clsql-postgresql)
        </screen>
          to load the PostgreSQL back-end.  The database type for the
          PostgreSQL back-end is <symbol>:postgresql</symbol>.</para>
          </variablelist>
        </sect3>
       </sect2>
+      <sect2><title>Notes</title>
+      <para>None.</para>
+      </sect2>
     </sect1>
 
     <sect1 id="postgresql-socket">
          </variablelist>
        </sect3>
       </sect2>
+      <sect2><title>Notes</title>
+      <para>None.</para>
+      </sect2>
     </sect1>
 
   <sect1 id="mysql">
     <title>MySQL</title>
     <sect2>
       <title>Libraries</title>
-      <para>The &mysql; back-end needs access to the &mysql; C 
+      <para>The &mysql; back-end requires the &mysql; C 
        client library (<filename>libmysqlclient.so</filename>).
        The location of this library is specified 
        via <symbol>*mysql-so-load-path*</symbol>, which defaults
        <title>Connection Specification</title>
        <sect3>
          <title>Syntax of connection-spec</title>
-         <synopsis>(<replaceable>host</replaceable> <replaceable>db</replaceable> <replaceable>user</replaceable> <replaceable>password</replaceable>)</synopsis>
+         <synopsis>(<replaceable>host</replaceable> <replaceable>db</replaceable> <replaceable>user</replaceable> <replaceable>password</replaceable> &amp;optional <replaceable>port</replaceable>)</synopsis>
        </sect3>
        <sect3>
          <title>Description of connection-spec</title>
                  field.</para>
              </listitem>
            </varlistentry>
+           <varlistentry>
+             <term><parameter>port</parameter></term>
+             <listitem>
+               <para>String representing the port to use for
+                 communication with the MySQL server.</para>
+             </listitem>
+           </varlistentry>
          </variablelist>
        </sect3>
       </sect2>
+      <sect2><title>Notes</title>
+      <sect3><title>FDDL</title> 
+      <itemizedlist mark='opencircle'>
+        <listitem>
+          <para>
+            <link
+            linkend="drop-index"><function>drop-index</function></link>
+            requires a table to be specified with the
+            <symbol>:on</symbol> keyword parameter.
+          </para>
+        </listitem>
+        <listitem>
+          <para>
+            <glossterm linkend="gloss-view">views</glossterm> are not
+            supported by &mysql;. 
+          </para>
+        </listitem>
+        <listitem>
+          <para>
+            The <symbol>:transactions</symbol> keyword argument to
+            <link
+            linkend="create-table"><function>create-table</function></link>
+            controls whether or not the created table is an InnoDB
+            table which supports transactions.
+          </para>
+        </listitem>
+        <listitem>
+          <para>
+            The <symbol>:owner</symbol> keyword argument to the FDDL functions 
+            for listing and testing for database objects is ignored. 
+          </para>
+        </listitem>        
+      </itemizedlist>
+      </sect3>
+      <sect3><title>FDML</title>
+      <itemizedlist mark='opencircle'>
+        <listitem>
+          <para>
+            Prior to version 4.1, &mysql; does not support nested
+            subqueries in calls to <link
+            linkend="select"><function>select</function></link>.
+          </para>
+        </listitem>
+      </itemizedlist>
+      </sect3>
+      <sect3><title>Symbolic SQL Syntax</title>
+      <itemizedlist mark='opencircle'>
+        <listitem>
+          <para>
+            &mysql; does not support the <function>||</function>
+            concatenation operator. Use <function>concat</function>
+            instead.
+          </para>
+        </listitem>
+        <listitem>
+          <para>
+            &mysql; does not support the <function>substr</function>
+            operator. Use <function>substring</function> instead.
+          </para>
+        </listitem>
+        <listitem>
+          <para>
+            &mysql; does not support the
+            <function>intersect</function> and
+            <function>except</function> set operations.
+          </para>
+        </listitem>
+        <listitem>
+          <para>
+            &mysql; (version 4.0 and later) does not support string
+            table aliases unless the server is started with
+            ANSI_QUOTES enabled.
+          </para>
+        </listitem>
+      </itemizedlist>
+      </sect3>
+      </sect2>
     </sect1>
-
+    
     <sect1 id="odbc">
       <title>&odbc;</title>
       <sect2>
          </variablelist>
        </sect3>
       </sect2>
+      <sect2><title>Notes</title>
+      <sect3><title>FDDL</title> 
+      <itemizedlist mark='opencircle'>
+        <listitem>
+          <para>
+            The <symbol>:owner</symbol> keyword argument to the FDDL functions 
+            for listing and testing for database objects is ignored. 
+          </para>
+        </listitem>        
+      </itemizedlist>
+      </sect3>
+      </sect2>
     </sect1>
 
     <sect1 id="aodbc">
          </variablelist>
        </sect3>
       </sect2>
+      <sect2><title>Notes</title>
+      <para>
+        None. 
+      </para>
+      </sect2>
     </sect1>
 
     <sect1 id="sqlite">
       <title>&sqlite;</title>
       <sect2>
        <title>Libraries</title> <para>The &sqlite; back-end requires
-       access to the &sqlite; shared library file. Its default file
-       name is <filename>/usr/lib/libsqlite.so</filename>.</para>
+       the &sqlite; shared library file. Its default file name is
+       <filename>/usr/lib/libsqlite.so</filename>.</para>
       </sect2>
       <sect2>
        <title>Initialization</title>
          </variablelist>
        </sect3>
       </sect2>
+      <sect2><title>Notes</title>
+      <sect3><title>Connection</title> 
+      <itemizedlist mark='opencircle'>
+        <listitem>
+          <para>
+            Passing <parameter>filename</parameter> a value of
+            <filename>:memory:</filename> will create a database in
+            physical memory instead of using a file on disk.
+          </para>
+        </listitem>        
+        <listitem>
+          <para>
+            Some operations will be many times faster if database
+            integrity checking is disabled by setting the SYNCHRONOUS
+            flag to OFF (see the SQLITE manual for details).
+          </para>
+        </listitem>
+      </itemizedlist>
+      </sect3>
+      <sect3><title>FDDL</title> 
+      <itemizedlist mark='opencircle'>
+        <listitem>
+          <para>
+            The <symbol>:owner</symbol> keyword argument to the FDDL functions 
+            for listing and testing for database objects is ignored. 
+          </para>
+        </listitem>        
+        <listitem>
+          <para>
+            The <symbol>:column-list</symbol> keyword argument to
+            <link
+            linkend="create-view"><function>create-view</function></link>
+            is not supported by &sqlite;. 
+          </para>
+        </listitem>
+      </itemizedlist>
+      </sect3>
+      <sect3><title>Symbolic SQL Syntax</title>
+      <itemizedlist mark='opencircle'>
+        <listitem>
+          <para>
+            &sqlite; does not support the <function>all</function>,
+            <function>some</function>, <function>any</function> and
+            <function>exists</function> subquery operations. 
+          </para>
+        </listitem>
+      </itemizedlist>
+      </sect3>
+      </sect2>
+    </sect1>
+
+    <sect1 id="sqlite3">
+      <title>&sqlite3;</title>
+      <sect2>
+       <title>Libraries</title> <para>The &sqlite3; back-end requires
+       the &sqlite3; shared library file. Its default file name is
+       <filename>/usr/lib/libsqlite3.so</filename>.</para>
+      </sect2>
+      <sect2>
+       <title>Initialization</title>
+       <para>
+         Use 
+         <screen>
+(asdf:operate 'asdf:load-op 'clsql-sqlite3)
+         </screen>
+         to load the &sqlite3; back-end.  The database type for the &sqlite3;
+         back-end is <symbol>:sqlite3</symbol>.
+       </para>
+      </sect2>
+      <sect2>
+       <title>Connection Specification</title>
+       <sect3>
+         <title>Syntax of connection-spec</title>
+         <synopsis>(<replaceable>filename</replaceable> &amp;optional <replaceable>init-function</replaceable>)</synopsis>
+       </sect3>
+       <sect3>
+         <title>Description of connection-spec</title>
+         <variablelist>
+           <varlistentry>
+             <term><parameter>filename</parameter></term>
+             <listitem>
+               <para>String representing the filename of the &sqlite3;
+               database file.</para>
+             </listitem>
+           </varlistentry>
+           <varlistentry>
+             <term><parameter>init-function</parameter></term>
+             <listitem>
+               <para>
+                A function designator.
+                <replaceable>init-function</replaceable> takes a
+                single argument of type
+                <type>sqlite3:sqlite3-db</type>, a foreign pointer to
+                the C descriptor of the newly opened database.
+                <replaceable>init-function</replaceable> is called by
+                the back-end immediately after &sqlite3;
+                <function>sqlite3_open</function> library function,
+                and can be used to perform optional database
+                initializations by calling foreign functions in the
+                &sqlite3; library.
+               </para>
+               <para>
+                An example of an initialization function which
+                defines a new collating sequence for text columns is
+                provided in
+                <filename>./examples/sqlite3/init-func/</filename>.
+               </para>
+             </listitem>
+           </varlistentry>
+         </variablelist>
+       </sect3>
+      </sect2>
+      <sect2><title>Notes</title>
+      <sect3><title>Connection</title> 
+      <itemizedlist mark='opencircle'>
+        <listitem>
+          <para>
+            Passing <parameter>filename</parameter> a value of
+            <filename>:memory:</filename> will create a database in
+            physical memory instead of using a file on disk.
+          </para>
+        </listitem>        
+        <listitem>
+          <para>
+            Some operations will be many times faster if database
+            integrity checking is disabled by setting the SYNCHRONOUS
+            flag to OFF (see the SQLITE manual for details).
+          </para>
+        </listitem>
+      </itemizedlist>
+      </sect3>
+      <sect3><title>FDDL</title> 
+      <itemizedlist mark='opencircle'>
+        <listitem>
+          <para>
+            The <symbol>:owner</symbol> keyword argument to the FDDL functions 
+            for listing and testing for database objects is ignored. 
+          </para>
+        </listitem>        
+        <listitem>
+          <para>
+            The <symbol>:column-list</symbol> keyword argument to
+            <link
+            linkend="create-view"><function>create-view</function></link>
+            is not supported by &sqlite3;. 
+          </para>
+        </listitem>
+      </itemizedlist>
+      </sect3>
+      <sect3><title>Symbolic SQL Syntax</title>
+      <itemizedlist mark='opencircle'>
+        <listitem>
+          <para>
+            &sqlite3; does not support the <function>all</function>,
+            <function>some</function>, <function>any</function> and
+            <function>exists</function> subquery operations. 
+          </para>
+        </listitem>
+      </itemizedlist>
+      </sect3>
+      </sect2>
+    </sect1>
+
+  <sect1 id="oracle">
+    <title>Oracle</title>
+    <sect2>
+      <title>Libraries</title>
+      <para>The &oracle; back-end requires the &oracle; OCI client
+      library. (<filename>libclntsh.so</filename>).  The location of
+      this library is specified relative to the
+      <symbol>ORACLE_HOME</symbol> value in the operating system
+      environment.
+      </para>
+    </sect2>
+    <sect2>
+      <title>Library Versions</title>
+      <para>
+       &clsql; has tested sucessfully using the client library from
+       Oracle 9i and Oracle 10g server installations as well as
+       Oracle's 10g Instant Client library. For Oracle 8 and earlier
+       versions, there is vestigial support by pushing the symbol
+       <symbol>:oci7</symbol> onto <symbol>cl:*features*</symbol>
+       prior to loading the <filename>clsql-oracle</filename> &asdf;
+       system.
+       <screen>
+         (push :oci7 cl:*features*)
+         (asdf:operate 'asdf:load-op 'clsql-oracle)
+       </screen>
+      </para>
+    </sect2>
+    <sect2>
+      <title>Initialization</title>
+      <para>
+       Use 
+       <screen>
+(asdf:operate 'asdf:load-op 'clsql-oracle)
+       </screen>
+       to load the &oracle; back-end.  The database type for the Oracle
+       back-end is <symbol>:oracle</symbol>.
+      </para>
+      </sect2>
+      <sect2>
+       <title>Connection Specification</title>
+       <sect3>
+         <title>Syntax of connection-spec</title>
+         <synopsis>(<replaceable>global-name</replaceable> <replaceable>user</replaceable> <replaceable>password</replaceable>)</synopsis>
+       </sect3>
+       <sect3>
+         <title>Description of connection-spec</title>
+         <variablelist>
+           <varlistentry>
+             <term><parameter>global-name</parameter></term>
+             <listitem>
+               <para>String representing the global name of the Oracle database.
+                 This is looked up through the tnsnames.ora file.</para>
+             </listitem>
+           </varlistentry>
+           <varlistentry>
+             <term><parameter>user</parameter></term>
+             <listitem>
+               <para>String representing the user name to use for
+                 authentication.</para>
+             </listitem>
+           </varlistentry>
+           <varlistentry>
+             <term><parameter>password</parameter></term>
+             <listitem>
+               <para>String representing the password to
+                 use for authentication..</para>
+             </listitem>
+           </varlistentry>
+         </variablelist>
+       </sect3>
+      </sect2>
+      <sect2><title>Notes</title>
+      <sect3><title>Symbolic SQL Syntax</title>
+      <itemizedlist mark='opencircle'>
+        <listitem>
+          <para>
+            The <function>userenv</function> operator is &oracle; specific. 
+          </para>
+        </listitem>
+        <listitem>
+          <para>
+            &oracle; does not support the <function>except</function>
+            operator. Use <function>minus</function> instead.
+          </para>
+        </listitem>
+        <listitem>
+          <para>
+            &oracle; does not support the <function>all</function>,
+            <function>some</function>, <function>any</function>
+            subquery operations.
+          </para>
+        </listitem>
+      </itemizedlist>
+      </sect3>
+      <sect3><title>Transactions</title>
+      <itemizedlist mark='opencircle'>
+        <listitem>
+          <para>
+            By default, &clsql; starts in transaction AUTOCOMMIT mode
+            (see <link
+            linkend="set-autocommit"><function>set-autocommit</function></link>).
+            To begin a transaction in autocommit mode, <link
+            linkend="start-transaction"><function>start-transaction</function></link>
+            has to be called explicitly.
+          </para>
+        </listitem>
+      </itemizedlist>
+      </sect3>
+      </sect2> 
     </sect1>
 
   </appendix>