############################################################################
##                                                                        ##
## This file describes the basic steps to install TimeDB 1.07.            ##
## TimeDB is the TimeCenter Data Base System, which is a component of the ##
## TimeCenter Architecture.                                               ##
##                                                                        ##
## TimeDB was developped by Andreas Steiner. It was written using SICStus ##
## Prolog and was ported to run with SWI Prolog.                          ##
## TimeDB supports the query language ATSQL2, which was designed by       ##
## Michael Boehlen, Christian Jensen and Richard Snodgrass and Andreas    ##
## Steiner.                                                               ##
##                                                                        ##
## ATSQL2 is the result of integrating three different approaches, namely ##
## * TSQL2, a consensus temporal query language,                          ##
## * ChronoLog, introducing the concept of temporal completeness (Michael ##
##   Boehlen, University of Aalborg, Denmark)                             ## 
## * Bitemporal ChronoSQL (Andreas Steiner, ETH Zuerich, Switzerland),    ##
##   featuring a bitemporal query language.                               ## 
##                                                                        ##
## TimeDB runs as a frontend to the commercial (relational) database      ## 
## system Oracle. ATSQL2 statements (queries, updates, and assertions)    ##
## are compiled into (sequences of) SQL-92 statements which are executed  ##
## by the backend. This approach guarantees a high portability between    ##
## different platforms and different DBMS backends. TimeCenter provides   ##
## bitemporal statements. It excels in a seamless integration of time     ##
## into databases by supporting upwards compatibility and temporal        ##
## upwards compatibility.                                                 ##
##                                                                        ##
## Implementation is continuing.                                          ##
##                                                                        ##
## A SQL main memory interpreter is shipped with this release, such that  ##
## TimeDB can be run without Oracle.                                      ##
##                                                                        ##
## Questions, remarks and bug reports can be addressed to                 ##
## Email  : steiner@inf.ethz.ch                                           ##
## Surface: Andreas Steiner                                               ##
##          Information Systems                                           ##
##          ETH Zuerich                                                   ##
##          8092 Zuerich, Switzerland                                     ##
##                                                                        ##
## This software is free and in the public domain.                        ##
##                                                                        ##
## SWI-Prolog can be downloaded from:                                     ##
##                                                                        ##
##                 ftp://swi.psy.uva.nl/pub/SWI-Prolog/                   ##
##                                                                        ##
## Make sure you use SWI-Prolog 2.1.9 or a newer version!!                ##
##                                                                        ##
##                                                                        ##
##                                              Zuerich, November 1, 1996 ##
##                                                        Andreas Steiner ##
##                                                                        ##
############################################################################

0) Contents
-----------
  1) Changes to you .cshrc file
  2) Initialize a database
  3) Running TimeDB
  4) Contributors


1) Changes to you .cshrc file
-----------------------------
To start up TimeDB you have to set a few environment variables in your .cshrc file:

    # Oracle Emulator
    #################
    setenv ORACLE_EMULATOR $HOME/TimeDB_V1.0/OraEmul

    # TimeDB
    ########
    setenv TIMEDB_TOPDIR $HOME/TimeDB_V1.0/TimeDB
    setenv TIMEDB_HOME $TIMEDB_TOPDIR/src
    set path = ($TIMEDB_TOPDIR/bin $path)


2) Initialize a database
------------------------
To be able to run TimeDB you first have to create a database. 
Initialize database 'scott/tiger', database is created on the fly, password is ignored:

    cd $TIMEDB_HOME
    initdb -e scott/tiger


3) Running TimeDB
-----------------
After this TimeDB is ready to run with the SQL emulator. The command 'pl' must start 
SWI-Prolog 2.1.9 :

    cd $TIMEDB_HOME
    pl -A0 -g '[timeDB]'
    /* opening a database */
    open 'scott/tiger';
    ...
    /* see example commands in the demo files */
    select * from cat;
    create table p(a integer) as valid;
    ...
    /* executing all commands stored in a file */
    /* instead of 'user' (= screen) you can specify a file */
    batch '../Demos/demo01' 'user';
    ...
    /* display SQL statements on the screen */
    trace;
    notrace;
    ...
    close;
    quit;



4)  Contributors
----------------
TimeDB was mainly developed as part of my (ongoing) PhD-thesis at ETH-Zuerich in 
the group headed by Robert Marti.

The following people were (directly or indirectly) involved in the implementation
of TimeDB:

	Michael Boehlen
	Christof Flueler
	Roman Gross
	Daniel Pulfer

Many thanks to Thomas Myrach for his helpful comments on earlier versions of the 
prototype and for his demos.

Enjoy it!

Andreas Steiner
