Copyright © 2001, 2002 Harald Wabnig

email: wabnig@testready.net    

homepage: www.testready.net  

 

 

DB-Generator User Documentation

 

DB-Generator User Documentation. 1

Installation. 1

Installation under Windows. 1

Installation under Linux. 1

DB-Generator Program “dbgen”. 2

Command-line Parameters. 2

 

Installation

 

The DB-Generator is included in the Speedy- and Speedy1-packages. So download the package appropriate for your System. Packages for Linux (speedy-x.x.x.zip/speedy1-x.x.x.zip) and Windows (speedy_win-x.x.x.zip/speedy1_win-x.x.x.zip) are available. All packages are compressed in the zip-format. So you need a zip-utility to uncompress (e.g. Winzip under Windows or “unzip speedy-x.x.x.zip” under Linux).

 

Uncompress the package to a new directory. The file-structure contains sub-directories which holds the binaries. There you find the “dbprep” binary which is the executable for the DB-Generator.

 

The allowed database-typenames are defined in the “typename.dat”-file. To allow DB-Generator find this file you must either copy the file into the local directory or set up the DBDAT_PATH environment variable (which is the recommended way).

 

Note: If you install the Speedy/Speedy1-package you should not need to do any more.

Installation under Windows

To access to the binaries from the MSDOS-shell you must add the path to the binary-directory to the PATH-environment-variable in the “autoexec.bat”-file in the root directory of drive C.

 

To set up the paths you should edit the file “autoexec.bat” for example in the following way:

 

[…]

SET PATH=<existing PATH>;<binaries-path>\bin;

SET DBDAT_PATH=<binaries-path>\include\dat

[…]

Installation under Linux

You must add the path to the binaries to the PATH-environment-variable. You can do this automatically by putting the command in the “.profile”-file in your home-directory.

 

To set up the paths you should edit the file “.profile” in the following way:

 

[…]

export PATH=.:<binaries-path>/bin:$PATH

export DBDAT_PATH=<binaries-path>/include/dat

[…]

DB-Generator Program “dbgen”

The DB-Generator allows you to generate SQL-database-create-files out of DB-Preparator dat-files. The generated db-files can be used to set up the Speedy/Speedy1-database. The function can also be used the other way round. If the program is used in this way the resulting dat-file will of course require additional manual editing.

Command-line Parameters

General format:      dbgen <input file> <output-file> [options]

Examples:              dbgen phonedb.dat phonedb.db
                    dbgen phonedb.db phonedb.dat

Possible options:

*    -noenv: The DBDAT_PATH environment variable will be ignored.

*    -tabnr: A ‘tablenr.dat’-file suitable for the DB-Preparator will be generated.