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 ToolBox, and selecting the DATABASE tab in the appearing dialog window.
To create a new database please proceed as follows.
Derby JDBC Database Creation (default)
Note: After the installation of Pmod3.4, 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
Numerical Accuracy of Images Stored in the Database
Images are stored to the database using Enhanced DICOM IODs which are selected according to the image modality setting. The accuracy of the standard IODs is limited, and if the images have a large dynamic range rounding errors can occur. In these situations PMOD may use a private IOD which supports floating numbers to avoid rounding errors. This behavior is enabled by the Database supports FLOAT representation of image objects box.
The float representation is an advantage if the images are used for further processing in PMOD. When such images are exported, PMOD converts the images to the standard IODs, whereby the rounding errors might be introduced.
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.4 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, e.g. 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 database initially. However, once in use Pmod remembers the least recently used database.
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 structure 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 Backup with scheduler 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 Backup with scheduler 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.