This window allows you to set various preferences in the way you use the Garden Notebook application. In particular, you need to set up your database.

1. ## General Settings

   This section contains some miscellaneous settings.

   1. Licence agreement.

      You must agree to the licence conditions before using this application. You only need to do this once.

   2. Require login.

      If this option is selected, the Settings page will be shown every time you start the application. This is to enable logging on to a database; see the appropriate database page for details.

      You will probably normally have this option off

   3. Reset.

      This will clear all your preferences including database details.

2. ## Licence Conditions

   The Garden Notebook application is issued as free software under the GNU General Public Licence

3. ## JSON Settings

   ### What is JSON?

   JSON, or JavaScript Object Notation, is a standard method for holding structured data in a human readable form. The Garden Notebook application uses JSON as a means of exporting the database contents and reimporting them. This allows data to be moved between databases or backed up.

   ### The JSON Settings

   There are various options you can set for the use of JSON.

   1. JSON export on exit.

      If this option is set, every time you exit the application it will write out the database as a set of JSON files. This option defaults to ‘yes’ to provide a routine backup. Writing the JSON files is fast.

   2. JSON export folder.

      The folder to contain JSON exports.

      This is a bit more complicated. Using ‘export to JSON on exit’ as a simple back-up only makes sense if multiple versions of the export are saved. To facilitate this, the

      JSON export folder here is just an outer level. Each export is written to a unique folder as follows:
      - A date stamped folder is created for the current date within the named JSON export folder
      - In the date folder a time stamped folder is created specifically for this export

      The default value is conventional but not a particularly user-friendly location. I suggest you change the value to something more easily accessible (and obvious). A cloud sync'ed folder such as DropBox or OneDrive might be a good idea.

      Please do not create folders or files within this folder structure yourself; this can lead to unexpected results.

   3. Export generations to retain.

      If JSON export is used as a simple back-up retaining multiple versions (or generations) there must be some way to tidy them up. Setting this value to a number greater then zero will delete all but that number of days of exports. Actual dates are not used, just that number of folders.

   4. JSON import folder.

      There's no point exporting the data as JSON if it cannot be imported. This specifies the folder to use to import data from a JSON export. The value does NOT track the folders created by the JSON export mechanism (there might be changes to this area).

4. ## Database Settings

   The Garden Notebook application needs to store your data. These data are stored where you specify and they are never sent to the developer or any other third party. The application currently uses a relational database or RDBMS to hold the data; several different RDBMS's are supported.

   1. ### hsqldb

      This RDBMS is supplied ‘built in’ to the application with no requirement for you to install any other software. hsqldb is fast and well supported and I strongly recommend that you use it in preference to the other RDBMS's supported. You can always change later using the JSON export/import mechanism to move your data.

      Note that the application is set up so that only one person at a time can use the hsqldb database; this does not stop many people using it, possibly from different PCs if the folder is accessible to them.

      1. Folder.

         hsqldb holds data in various files in a named folder. You need to specify the name of the folder here.

      2. Database.

         The name of the database to use. This field is here for consistency with the other RDBMS's and should not be changed.

      3. Create database?

         If the folder named above does not exist or is empty you will need to select one of the options here to create the database to use.

         1. Create empty.

            Use this option to create a database with nothing in it. This is intended for use when you wish to import JSON data previously exported.

         2. Create initialised.

            This will create a database with some basic data already installed to get you up and running quickly, or just to explore the application.

         The database created here has a fixed name (gardennotebook) which cannot be easily changed.

      4. User name.

         The user name to use. As created, the only user name is the administrator name ‘SA’. The application does not provide any tools to add users but the hsqldb tool ‘sqltool’ is included with the download. Please refer to the hsqldb website for further information.

      5. Password.

         The password for the user name. As created, this is not set. If you wish to change the password you will need to use the hsqldb tool ‘sqltool’ as above.

      6. Use this?

         Check this option to tell the application to use hsqldb as its data source.

      7. Cache values?

         If this is checked, the options specified here will be stored and used next time. If you do not set this, you will need to enter all the values each time you use the application.

         Please note that the user name and password are not encrypted in any way so might be available to other users of this PC.

   2. ### MS SQLServer

      MS SQLServer is an industrial strength RDBMS supplied by MicroSoft. It is available in various versions including a free-to-download version for development and personal use; the Garden Notebook application was written and tested using the developers version.

      The Database Details folder in the application download contains full instructions for installing MS SQLServer.

      1. Host.

         This is the URL for the machine hosting the RDBMS. If the server is running on your local PC, the appropriate value is ‘localhost’.

      2. Port.

         This is the port to connect to the server on. The usual value for MS SQLServer is 1433.

      3. Database.

         The name of the database to use. The default value is that used in the installation scripts.

      4. User name.

         The user name to use; you must create at least one user name when installing MS SQLServer. The application does not provide any tools to add users; use the MS SQLServer Management Studio to create users and roles as you see fit. Please refer to the MS SQLServer website for further information.

      5. Password.

         The password for the user name; a password will have been required when the user name was set up.

      6. Timeout.

         Communication between the application and the database server can take time, especially if the server is located on a different computer. If you experience time-out errors try setting this to a higher value.

      7. Use this?

         Check this option to tell the application to use MS SQLServer as its data source.

      8. Cache values?

         If this is checked, the options specified here will be stored and used next time. If you do not set this, you will need to enter all the values each time you use the application.

         Please note that the user name and password are not encrypted in any way so might be available to other users of this PC.

   3. ### MySQL

      MySQL is an industrial strength RDBMS developed as open source and currently supported by Oracle. A Community Edition is available for free download and that version was used to develop the Garden Notebook application.

      The Database Details folder in the application download contains full instructions for installing MySQL. In the spirit of full disclosure, I have had trouble installing and updating recent versions (8 et seq.) on Windows so I cannot really recommend it.

      1. Host.

         This is the URL for the machine hosting the RDBMS. If the server is running on your local PC, the appropriate value is ‘localhost’.

      2. Port.

         This is the port to connect to the server on. The usual value for MySQL is 3306.

      3. Database.

         The name of the database to use. The default value is that used in the installation scripts.

      4. User name.

         The user name to use; you must create at least one user name when installing MySQL. The application does not provide any tools to add users; use the MySQL Administrator tools (such as MySQL Workbench) to create users and roles as you see fit. Please refer to the MySQL website for further information.

      5. Password.

         The password for the user name; a password will have been required when the user name was set up.

      6. Timeout.

         Communication between the application and the database server can take time, especially if the server is located on a different computer. If you experience time-out errors try setting this to a higher value.

      7. Use this?

         Check this option to tell the application to use MySQL as its data source.

      8. Cache values?

         If this is checked, the options specified here will be stored and used next time. If you do not set this, you will need to enter all the values each time you use the application.

         Please note that the user name and password are not encrypted in any way so might be available to other users of this PC.

   4. ### MariaDB

      MariaDB is an industrial strength RDBMS developed as open source as a straight swap-out for MySQL. A Community Edition is available for free download and that version was used to develop the Garden Notebook application.

      The Database Details folder in the application download contains full instructions for installing MariaDB. I have not installed MariaDB on Windows - there are certain technical difficulties having both MySQL and MariaDB on the same PC - but download and installation on a NAS Server (in my case a basic Synology device) was reasonably straightforward.

      1. Host.

         This is the URL for the machine hosting the RDBMS. If the server is running on your local PC, the appropriate value is ‘localhost’.

      2. Port.

         This is the port to connect to the server on. The usual value for MariaDB is 3307.

      3. Database.

         The name of the database to use. The default value is that used in the installation scripts.

      4. User name.

         The user name to use; you must create at least one user name when installing MariaDB. The application does not provide any tools to add users; use the MariaDB Administrator tools to create users and roles as you see fit. Please refer to the MariaDB website for further information.

      5. Password.

         The password for the user name; a password will have been required when the user name was set up.

      6. Timeout.

         Communication between the application and the database server can take time, especially if the server is located on a different computer. If you experience time-out errors try setting this to a higher value.

      7. Use this?

         Check this option to tell the application to use MariaDB as its data source.

      8. Cache values?

         If this is checked, the options specified here will be stored and used next time. If you do not set this, you will need to enter all the values each time you use the application.

         Please note that the user name and password are not encrypted in any way so might be available to other users of this PC.