Databases

The Garden Notebook application stores data in a database. Databases are managed by an application called a RDBMS.

You can use one of the following RDBMSs:

  • hsqldb
  • MySQL
  • MariaDB
  • MS SQLServer

Please note that I cannot provide support for installing, running or maintaining any RDBMS other than hsqldb.

hsqldb

The hsqldb database manager is installed as part of the application and no action is needed from you - other than to decide which folder you want to keep the files in. When the application is not in use this folder contains a couple of text files which can be backed up by your normal back up routines.

(You do have a back up routine, don't you? If not start doing it now!)

This is by far and away the easiest way to use the Garden Notebook and I strongly recommend that this is the one you use.

MySQL and MariaDB

MySQL and MariaDB are open source RDBMSs and freely available to download. However, they are designed to be used on the sort of servers which power major web-sites and are overkill for desktop applications.

I've used MySQL for years professionally and have a certain fondness for it (the first versions of this application were developed with it). That said, installing MySQL on a desktop PC can be a challenge and updates can be difficult to apply.

When you configure the server it's important to select the option for 'lower case file/table names' and, very important, the Security option for old style security - this is NOT the recommended default. Set the server to run as a Windows service when asked. You can use the Control Panel later to change whether or not the service should run on startup. The notification tool (which you can install with the MySQL Installer) makes it easy to start and stop the service - if the notifier itself installs properly.

MariaDB is drop-in compatible with MySQL. I've never installed it on a desktop PC but most NAS drives have it available as an 'app'. I have it on my own Synology NAS and it is very fast. I've found support for it is difficult to find.

You will need to download the latest Connector/J from the appropriate website, install it and add it to the CLASSPATH environment variable. The MySQL installer will do this for you (but check CLASSPATH); it's a separate step for MariaDB.

You also need to set up the actual database the application will use. Use this file and the appropriate version of the mysql command line tool. This creates an empty database which needs to be populated from a JSON dump of a working database; either your own or this zipped archive of a basic installation, as used in the hsqldb option (unzip the file to use).

MS SQLServer

SQLServer is Microsoft's own RDBMS and is also intended for large scale servers. It is easy to install on desktop PCs and the Management Studio is very good. Set up for the Garden Notebook application requires some extra work post-installation.

Make sure the necessary services are running, namely the Server Agent and the Server Browser; from the Control Panel, Administrative Tools then Services. If the services are NOT running Start them or set their Startup Type as Automatic; you need to run as Administrator to do this. Be aware of Microsoft's warning about having the Browser start automatically.

You need to ensure the database instance is listening for TCP/IP connections. In C:\Windows\System32 find SQLServerManager16.msc and run it as Administrator. Under SQL SERVER NetworkConfiguration check Protocols for your Server instance and ensure that TCP/IP is enabled in the right hand panel.

You will need to download the latest Connector/J from Microsoft's website, install it and add it to the CLASSPATH environment variable.

You also need to set up the actual database the application will use. Use this file, and the Management Studio.

You also need to set up the actual database the application will use. Use this file and the appropriate version of the mysql command line tool. This creates an empty database which needs to be populated from a JSON dump of a working database; either your own or this zipped archive of a basic installation, as used in the hsqldb option (unzip the file to use).