The Database
Before the
software
can be used, a
relational SQL database must be created and a schema defined. The
creation of the database is a manual step, for example if you are
using Postgresql the following command will create the database
(where <database_name> is the name the wish to call the
database).
$
createdb <database_name>
For
other databases see relevant documentation.
Configuration
Once the
database has
been created,
you need to configure gSwing to use your database. The following
configuration variables are defined (with some default values) in
<gswing_home>/etc/properties.cfg
- host=<machine_name> # your machine hostname (note: problem
with using localhost with mysql – use machine name instead)
- port=<machine_port> # the port the database uses
- databaseName=<database_name> # the database name you
created above
- userName=<user_name> # the database user name
- driver=org.postgresql.Driver # the driver name
Connection to the Database
File -> Connect
You will be
prompted for a
password by the dialog below. Insert a password, if required, and
select OK.
Create Schema
Once connect to
the
database the schema can be created:
Tools - > Create Database
You will be prompted for a
state / nation name and the database schema will be created. The illustration
belows shows the
database schema: