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 Pmod4.1, one or two databases are already available: an empty Pmod database illustrated above as an initial container for own data, and a training Demo database if the example database was selected for installation.
mySQL JDBC Database Creation
The only difference to the procedure for the Derby database is in step 3, Database Connection. Please configure as follows:
The first part is the driver jdbc:mysql. The second part is the host on which the mySQL server is running, in the example above the same machine PMOD is running on, thus localhost. The third part is the mySQL database name, Pmod. In principle the database name can differ from the data source name, but this is not recommended.
User:Password: Fields to specify a user who has administrator privileges in the addressed mySQL installation and his password. The standard setting of mySQl is root and an empty password. If mySQL requires to enter a non-empty password for root, please specify it in this password field.
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.
Configuring Transaction Server Databases
PMOD allows publishing a local database for use by other PMOD installations using a server program called Transaction Server. To address a remote transaction server database, a data source must be defined as follows:
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. However, 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 such a Derby 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 Pmod4.1 already includes a transaction server definition of the Pmod database which is called DbSvr. The transaction server will be automatically started with the first interactive PMOD session. Access to Pmod through the transaction server is configured as the DbSvr database.
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.
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.
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 & Optimize button. This operation will not only update the table structure, but also the indexes and may dramatically speed up the access to aged, large databases.
Note: Transaction server data sources must be upgraded on the site of installation.
It is important to regularly back up the directory of the database tables as well as the data directory. This has to be done externally by the computer system administrator using reliable mechanisms for backing up important data.