Prepare your Database
 
Set your db-name etc in lib/WWWdb/Db/<Db>.rc
$ vi lib/WWWdb/Db/<Db>.rc

Create links for the db-dummys '' and Default.
$ ln -sf lib/WWWdb/Db/<Db>.rc lib/WWWdb/Db/.rc
$ ln -sf lib/WWWdb/Db/<Db>.rc lib/WWWdb/Db/Default.rc
$ ln -sf lib/WWWdb/Db/<Db>.pl lib/WWWdb/Db/.pl
$ ln -sf lib/WWWdb/Db/<Db>.pl lib/WWWdb/Db/Default.pl

Now, you need to setup the database. The script CreateNewDb.sh calls the script InstallDB.pl, which can: 
  • Create a Table, using the .dbdef-file
  •  Import Data, using the .csv-file
  •  Export Data, using the Table-name
  •  Re-create indices
Here you can see all the call-options.
$ InstallDB.pl -h
    Call:
        InstallDB.pl -D <database> -U <user>
            [-P <password>] [-H <host>]
            [-b Oracle|Pg|mysql|InterBase|ODBC]
            [-c][-e [-F <Field-List>] [-W <WHERE-clause>]][-i]
            [-s] [-dV]
            <xxx.dbdef> ... <xxx> ... <xxx.csv> ...

    Switches:
        -b <database-driver>
               at the moment, the following drivers are implemented:
               Pg        Postgres
               mysql     MySql
               Oracle    Oracle
               InterBase InterBase
               ODBC     Generic ODBC-driver
 
        -D     database
        -U     user
        -P     password
        -H     host (localhost)
        -F     list of fields to export, separated by comma
        -W     where-clause for export
        -s     silent-mode
        -d     Debugging-mode
        -I     Re-create indices (implies -c)
        -V     show version
        -f     force operation
        -c     create tables (*.dbdef)
        -e     export tables (*)
        -i     import tables (*.csv)
 
    Description:
        InstallDB.pl is used to create, import and export
        database-tables.
Now switch to the Database-Directory:
$ cd <WWWdb>/lib/WWWdb/Db
Create your new database as usually (look in the database-manual) 

(Now we are assuming that the database is of type PostgreSQL and it's name is 'test', and the db-user is 'dbuser' and it's db-password is 'dbpasswd') 

Create the tables for WWWdb and import the data: 

$ CreateNewDb.sh -cif -b pg -D test -U dbuser -P dbpasswd