home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 526.lha / sqldb_v1.0alpha / doc / sqldb.doc < prev    next >
Text File  |  1991-07-01  |  6KB  |  227 lines

  1.  
  2. Installation
  3. ------------
  4.  
  5.     Copy the main program sqldb/db to a directory in your executable path.
  6.     Copy the files in sqldb/libs to your libs: directory.
  7.     Add the assignment SQLDB: to your startup-sequence and have it point
  8.         to a central location for your tables.
  9.  
  10. Getting Started
  11. ---------------
  12.  
  13.     Command-line options to SQLdb:
  14.  
  15.     Option    Arguments    Default        Meaning
  16.     ------    ---------    -------        -------
  17.     -t    'd' or 'r'    'r'        Temporary table storage
  18.     -s    none        NA        Server mode
  19.  
  20.  
  21.     Temporary Tables
  22.  
  23.     Temporary table are created whenever you give SQL a select query to
  24.     perform.  The -t option allows you to specify where you wish the 
  25.     temporary tables to be stored.
  26.  
  27.     The 'r' argument specifies that temporary tables are to be stored in
  28.     main memory.
  29.  
  30.     The 'd' argument specifies that temporary table are to be stored in
  31.     the current directory from which SQLdb was started from.
  32.  
  33.     Server Mode
  34.  
  35.     When started up in Server Mode, SQLdb will open up an ARexx port and
  36.     await commands from the port.
  37.  
  38. Using the Command Shell
  39. -----------------------
  40.  
  41.     The command shell is a line oriented user interface.  Commands are
  42.     typed and the results are displayed on the screen.  The commands shell
  43.     is similar in operation to the Unix csh(1) program.
  44.  
  45.     Commands may span physical lines.  Commands MUST be terminated with a
  46.     semi-colon ';'.
  47.  
  48.     Upon startup, the command shell will attempt to execute commands in
  49.     the file '.dbcshrc'.  If this file does not exist in the current
  50.     directory, the command shell will give an error message saying so, and
  51.     will continue.
  52.     
  53.     The following variables have special meaning to the command shell:
  54.  
  55.     Name        Default        Meaning
  56.     ----        -------        -------
  57.  
  58.     EDITOR        'z'        Editor to be used with EDIT COMMAND
  59.  
  60.     PROMPT        'dbcsh>'    Command shell prompt string
  61.  
  62.     HISTORY        25        Number of commands in history buffer
  63.  
  64.     
  65.     Commands in the command shell
  66.  
  67.     EDIT COMMAND
  68.  
  69.     FORMAT: EDIT COMMAND history-number
  70.  
  71.     DESCRIPTION:
  72.     The edit command command lets you edit the specified command using your
  73.     favorite editor.
  74.  
  75.  
  76.     EXIT
  77.  
  78.     FORMAT: EXIT
  79.  
  80.     DESCRIPTION:
  81.     The exit command will exit you from the command shell.  All non-system
  82.     table must be closed before you may exit.
  83.  
  84.  
  85.     HISTORY
  86.  
  87.     FORMAT: HISTORY
  88.  
  89.     DESCRIPTION:
  90.     The history command displays a list of the history buffer.  Each entry
  91.     consists of the history number and the command text.
  92.  
  93.  
  94.     SET
  95.  
  96.     FORMAT: SET [ variable-name = variable-value ]
  97.  
  98.     DESCRIPTION:
  99.     The set command lets you store values in command shell variables that
  100.     can be used later.  If the arguments to set are omitted, a listing of
  101.     all variables and values is produced.
  102.  
  103.  
  104.     SYSTEM
  105.  
  106.     FORMAT: SYSTEM 'system-command'
  107.  
  108.     DESCRIPTION:
  109.     The system command allow you to execute a system command, such as
  110.     'dir' or 'll', without having to leave SQLdb.
  111.  
  112.  
  113.     VERSION
  114.  
  115.     FORMAT: VERSION
  116.  
  117.     DESCRIPTION:
  118.     The version command displays the current version and any other
  119.     pertinent information.
  120.  
  121.  
  122. ARexx
  123. -----
  124.  
  125.     The ARexx port created is called 'SQLserver'.
  126.  
  127.     The Arexx variable result will contain a valid value only when a row
  128.     of query results has been FETCHed with ExecSQL.
  129.  
  130.     The ARexx variable sqlca.sqlcode will be non-zero if an error has
  131.     occured in the processing of an SQL statement.  The error message will
  132.     be placed in the ARexx variable sqlca.sqlerrmsg.
  133.  
  134.  
  135.     ARexx commands
  136.  
  137.     ExecSQL
  138.  
  139.     FORMAT: 'ExecSQL' 'SQL-Command-string;'
  140.  
  141.     DESCRIPTION:
  142.     ExecSQL will send the given command to the interpreter to be executed.
  143.  
  144.  
  145.     ShutdownSQL
  146.  
  147.     FORMAT: 'ShutdownSQL'
  148.  
  149.     DESCRIPTION:
  150.     Shutdown will tell SQLdb to close the ARexx port and quit.
  151.  
  152.  
  153. SQL Language
  154. ------------
  155.  
  156.     This section will detail any differences/omissions/enhancements to
  157.     the ANSI standard of SQL.  This section will NOT teach you about the
  158.     language.  I would suggest the book:
  159.  
  160.             Using SQL
  161.             by James R. Groff & Paul N. Weinberg
  162.             Osborne McGraw-Hill
  163.             ISBN 0-07-881524-X
  164.  
  165.  
  166.     Omissions:  ( I plan to implement most if not all, eventually )
  167.  
  168.  
  169.     Not all datatypes in standard have been implemented
  170.  
  171.     Indexes are not implemented
  172.  
  173.     ORDER BY in SELECT query not implemented
  174.  
  175.     All features associated with multiple concurrent users not implemented
  176.  
  177.     INSERT INTO with subquery not implemented
  178.  
  179.     Views are not implemented
  180.  
  181.     Primary and foreign keys not implemented
  182.  
  183.     Domains are not implemented
  184.  
  185.     UNION, INTERSECT, etc not implemented
  186.  
  187.     
  188.  
  189.     Differences:
  190.  
  191.     subquerys delimited with '[]' instead of '()'
  192.  
  193.     Built-in functions only allow expressions inside parentheses
  194.  
  195.  
  196.     Enhancements: (Your favorite section :-)
  197.  
  198.  
  199.     SELECT has an additional clause called OUTPUT TO 'filename'.  This
  200.     will send the results of the query to the specified filename.
  201.  
  202.  
  203.     Missing values:
  204.     ANSI SQL has the concept of NULL values.  This is a three-valued logic
  205.     system.  When data is missing, it has the value NULL.
  206.  
  207.     SQLdb has the concept of NULL values as well.  As described by the 
  208.     Relational Model, Version 2, SQLdb has a four-valued logic system:
  209.     TRUE,FALSE,AMARK,IMARK.  The AMARK indicates an applicable missing
  210.     value.  Meaning, a value that should be there, but isn't.  The IMARK
  211.     indicates an inapplicable missing value.  NULLs in ANSI SQL would be
  212.     semantically equivalent to AMARKs in SQLdb.
  213.  
  214.     Boolean expressions now have four qualifiers:
  215.       NOT, MAYBE_I, MAYBE_A, MAYBE
  216.  
  217.     P |NOT P   P | MAYBE_I P   P | MAYBE_A P   P | MAYBE P
  218.     --------   -------------   -------------   -----------
  219.     t | f       t | f       t | f       t | f
  220.     a | a      a | f           a | t       a | t
  221.     i | i      i | t        i | f       i | t
  222.       f | t      f | f        f | f       f | f
  223.  
  224.  
  225.     In query results, AMARKs are display as -AM-, and IMARKs are displayed
  226.     as -IM-.
  227.