$Id: install_db.txt,v 1.1 2002/08/12 01:40:16 als Exp $

How to install the database part of SCASS.
-----------------------------------------

preconditions:
 - a running database system (now, thats a big surprise!), more 
   specifically, a PostgreSQL installation, preferrably PostgreSQL 7.2
   and up since SCASS has been developed and tested with the PostgreSQL 
   7.2.x versions and might not work with older installations,
 - database admin priviliges, since you need to be able to
    - create database users,
    - create a database,
    - enable the use of procedural languages for stored procedures,
 - PostgreSQL with support for stored procedures using the "plperl"
   and "plpgsql" languages (both should usually be available in default
   installations of PostgreSQL),
 - some experience with using the PostgreSQL tools (createdb, createlang,
   psql),

Getting to work:

1. You need four classes of database users:
    - FES (FrontEndSystem), to run the SCASS frontend system (websystem),
      usually one user, suggested name scass_web,
    - BES (BackEndSystem), to run the various backend modules,
      number of users depends on how you plan to use the backend modules,
      but at least one,
    - USER (normal users), using SCASS via the frontend (web) system,
      as many as are needed, at least one,
    - DBADMIN (DB admin for SCASS), special user to administrate the 
      database part of SCASS, has ALL permission on all SCASS tables,
      should only be needed to install and modify the installation,
      usually one user,
   create those users within the running PostgreSQL installation you plan
   to use for SCASS,
2. change into directory where you unpacked the scass.bes archive into,
   change into the subdirectory SQL,
3. run "make", answer all questions, if you made any mistakes, run 
   "make clean", the re-run "make",
4. create the database "scass",
5. enable the use of the procedural languages "plperl" and "plpgsql"
   on the database "scass" (if they are not already enabled via the
   template1 database),
6. build the structure of the database "scass" by connecting to it and
   processing the file "scass.sql" which was created during step 3, for
   instance by running "psql scass < scass.sql"
7. Customize the SCASS configuration (which is entirely stored in the
   database) by examing and, where appropriate, updating, the tuples in
   the table scass_config.
8. Ok, your're done with the database part. Now install the FES code
   and the BES modules.

