POSTGRES and ESPACE The tar file contains basically two programs: 1.) db_rw_sql : reads an ESPACE data base and creates a file containing SQL statements that create a set of tables containing the database. 2.) db_ESPACE.py: a PYTHON script that extracts the data base from the SQL server (in this case POSTGRES) and creates a file that is readable by ESPACE. To create the program do the following steps: 1) extract the db_sql.tar.gz file into the spectra directory 2) make -f db_rw_sql.mak : compiles the code and creates a subdirectory called sql. 3) the program that has been created is called db_rw_sql. It can be run from any directory. However where ever you are running it it expects a sql subdirectory. 4) Create a new SQL database using postgres. I am always using here the psql code, '>' is assumed to be the system prompt. >psql -c "create database my_database" or createdb my_database (to erase en entire database use: > psql -c "drop database my_database" or dropdb my_database) To insert the new data: cat sql/create_tables.sql | psql my_database Now all the data are entered and can be accessed graphically via the tool pgaccess which is distributes by POSTGRES or you can access the data using psql. Using perl or PYTHON also allow you to access the database and extract data. This is used in the PYTHON script db_ESPACE.py that creates an ESPACE readable file from the data stored in the SQL database using SQL queries. The same could also be acomplished using PERL but I know PYTHON better. To run db_ESPACE.py you habe to edit the first few lines to enter your server, user and database name. In a future version one will be able to enter these data via command line arguments.Running the script : > python db_ESPACE.py creates a file called db_flat which is the created ESPACE database. Notes: Depending on your local installation of POSTGRES the configuration file pg_hba.conf has to be edited, and you as database user need to be allowed to create a database. For more information on POSTGRES check their documentation e.g. at "http://www.postgresql.org/docs/7.3/static/index.html"