The creation of databases and the configuration of remote databases is a part of the general PMOD configuration. It is opened by calling the
button from the PMOD Toolbar, and selecting the DATABASE tab in the appearing dialog.
To create a new database please proceed as follows.
Derby JDBC Database Creation (default)
Note: After the installation of Pmod3.1, the Pmod database illustrated above is already available and contains different types of example data, unless the example database was not selected for installation.
mySQL JDBC Database Creation (deprecated)
Note: You can create different SQL databases to collect data for different projects. They must, of course, have different names and should most likely save the data files in different directories.
PMOD allows publishing a local data base to other PMOD installations by a server program called Transaction Server (see below how to set up the transaction server). To address such a transaction server database, a data source must be defined as follows:
Access to Remote Transaction Server Databases
Multiple Access to Derby JDBC Database
It is the nature of embedded databases as a Derby JDBC database that they can only be accessed by a single process. Therefore, if you start two instances of PMOD, only the first one will be able to access the database directly. The second one will not get access and show an error message
The solution for this case is to publish the database by a transaction server and access the data through it. In this way, an arbitrary number of processes can access the database.
Note: The default configuration of Pmod3.1 already includes a transaction server definition of the Pmod database. The transaction server will be automatically started with the first interactive PMOD session. Access to Pmod through the transaction server is configured as the PmodTS database.
Database De-Activation
Sometimes there is a need to temporarily deactivate a data source, eg. because a remote system is down. In this case the box Inactive can be checked to avoid lengthy timeouts.
Default Database
The database which is shown in the data source list when the configuration is saved will serve as the default database. Therefore, you are recommended to set the list entry to the most frequently used database before closing. This setting can be overridden by user-specific database preferences.
Database Upgrading
After updating a PMOD installation there might be a need to adjust the data structure of the existing databases for using them further. To do so, select a JDBC data source and activate the Update button.
Note: Transaction server data sources must be upgraded on the remote installation.
Database Backup
The SQL database tables of a local JDBC data source can be backed up using the buttons shown below.
The Backup path can be specified with the SQL Backup Properties button.
An interactive backup can then be performed with the Save SQL Backup button. It can be restored with the Restore SQL Backup button.
Automatic backups based on a scheduling are also supported. Initially the scheduling section is gray. Only when a local transaction server has been defined and started, and the Automatically box is checked, it becomes active. At the scheduled times the database tables are saved to the specified directory, provided that the local transaction server is running.
CAUTION: The database backup described above only saves the SQL database tables to a safe place, not the data files themselves. To backup the data please manually copy all information in the configured File Storage Area Path to the backup place.