Database Issues


The SQLSpaces are based on a relational database management system. At the moment programmers can choose between three different database systems: MySQL, HSQL and PostgreSQL. By default HSQL is used, but there are certain pros and cons, that have to be considered.


HSQLDB is an quite lightweight, open-source database, that is implemented in java. For this reason it was completely integrated into the SQLSpaces, so that users do not need to take care about the installation and configuration of a database system. By default data is stored in memory, but this can also be changed in the configuration file.

The main advantage of this database type is the convenience, that a user needs to do nothing else. Only if the data should be stored persistently, the configuration file needs to be changed slightly. There are, however, two disadvantages of it: Firstly it is not that easy to inspect the tables, if you really want to do so (and know how to read it). Of course there are tools, but there are simply more and better ones for MySQL. Secondly and more important it is simply slower than MySQL (according to tests).



The second database system is MySQL. All versions after 5 can be used as a backend for the SQLSpaces. Therefore the configuration file needs to be edited, so that the SQLSpaces server knows the right username, password, host, port and schema name that are to be used.

The advantage of using MySQL is simply the high speed it has in contrast to HSQLDB. However, on the other side the MySQL server needs to be installed and configured.



The latest addition to the supported databases was PostgreSQL. It was developed for version 8.4, but later version should also work fine. The reason for developing this was to test if it would be faster than the MySQL backend, however there are no real performance differences. So if you are more familiar with PostgreSQL or use it anyway in your system, this might be a good reason to not choose MySQL. All in all, it has quite the same pros and cons like MySQL.

However, be aware that this backend is the least tested one and could therefore have still bugs.