Access to an external database (of the mysql type) is currently require to use the software. Such a db can be useful but it should be possible to start the software when no access to such database is available.
How to do that:
The access is (mainly) done through hibernate. It is thus technically possible to change the database type. We could allow for a database of type "embedded". This would change nothing else to the software. As an additional benefit we would also have the possibility to allow for many other types of databases (postgre, MSSQL, etc.) To do this, we need:
- a configuration file where the user can specify what db type he wants and how to access it
=> for this we need to remove that crappy configuration window in the software accessing the registry and replace with a neat configuration file (an other benefit, because that window and registry access are partly broken)
- (a default configuration file would be bundled with the default software download and would specify the type "embedded")
- remove the (few) remaining accesses to specific mysql commands (i.e. those that do not go through the hibernate framework)
=> hopefully there is only one area where this is done, and this is to copy the database schema.
Advantages:
This would render the software easier to try (just install the software, no need to have database management skills).
This would allow to have both the benefits of a simple to use software (no database) and a pro, multi user software with db access: just change the configuration file.
No supplementary programmer effort required in the (existing and future) plugins to maintain these two benefits.
Note: some tickets could be opened about the sub-points listed here.
Tommi says: "I'd say h2 is the best option, see http://www.h2database.com/html/main.html"
Done (in CVS head). Now the user may configure access to the DB in the hibernate.cfg.xml file, but he does not need to: the default provides an embedded database that write files to disk. Makes the software easier to start.
The configuration panel is gone and the messy code related to the parameters has been cleaned a bit. Also the backup project feature in the software has gone.
BTW I used HSQLDB because it is the first thing I thought of, but H2 (as suggested) seems to be a better option. Hopefully suffices to change the hib config file (from http://java.dzone.com/articles/hibernatecfgxml-settings-derby\):
<property name=”hibernate.connection.driver_class”>org.h2.Driver</property>
<property name=”hibernate.connection.url”>jdbc:h2:path\databaseName</property>
<property name=”hibernate.connection.username”>sa</property>
<property name=”hibernate.connection.password”></property>
<property name=”hibernate.default_schema”>PUBLIC</property>
<property name=”hibernate.dialect”>org.hibernate.dialect.H2Dialect</property>