hsqldb.org Home
                  Page

HSQLDB - 100% Java Database

How To / FAQ


How to install and run HSQLDB
How to compile HSQLDB
How to create a new database
How to start programming JDBC / HSQLDB
Where to get more documentation
How to use HSQLDB inside JBuilder
How to upgrade from an old version
Can I use HSQLDB in my program
Reliability, Performance and Deployment

Documentation



How to install and run HSQLDB


How to compile HSQLDB

You don't need to. A compiled JAR of HSQLDB is included in the zip in the /lib folder. This runs under Java 11 and later and support Java module system. A second Jar, hsqldb-jdk8.jar works with JRE 8 and later. If you want to re-compile HSQLDB, you will need a JDK. You can use JDK 8, 11 or 17. See the Guide and the documentation in the /build directory.


How to create a new database

A new database is created automatically if it does not yet exist. Just connect to the not-yet-existing database using the jdbc:hsqldb:file:«database-path» URL (should replace the last part with the path you want) with the user 'sa'  (or any other name)  and a password (can be an empty string). You will use this name and password to connect again.


How to start programming JDBC / HSQLDB

HSQLDB comes with PDF and HTML documentation, with example program source code that can help programers who are new to JDBC programming.

Basic sample programs are in the /src/org/hsqldb/sample folder.

Source code of test programs are useful examples of how to use different features of JDBC and SQL. Check the sources in the /src/org/hsqldb/test folder.

SQL test scripts are in the /runtest folder and offer extensive examples of SQL statements.


Where to get more Documentation

HSQLDB has a standard JDBC interface. HSQLDB specific JDBC documentation is included in the /doc/src folder.

There are also many books available on JDBC programming.

HSQLDB is covered in hundreds of books on Java programming. Search Google Books for "HSQLDB"


How to use HSQLDB inside Eclipse, etc.

To use HSQLDB at design-time in Eclipse, NetBeans or other tools, you usually require the plug-in for databases that comes with the development environment. You usually need to add a reference to the HSQLDB jar to the environment. Also you normally need to register the JDBC driver (which is part of the hsqldb.jar) with the environment. A dedicated plugin is already available for Eclipse.


How to upgrade from an old version to the current version

It is recommended that you close the databases with the SHUTDOWN command before they are opened with version 2.x. If the database is not read-only, it will be upgraded to the latest version. Databases made with versions earlier than 2.0 must be upgraded before opening with version 2.6.0. This is described in the Guide.

If you use CACHED tables, the procedures in the System Management and Deployment Issues section of the Guide should be followed. A SHUTDOWN COMPACT after the upgade is recommended.

Note that an upgrade is a one-way process, so please always keep a backup of the old database.


License


Reliability, Performance and Deployment

 

SourceForge Logo

This page last updated 21 March 2021
Contents of this page are ©2001-2021 The hsql Development Group. All rights reserved under the terms of the applicable Licenses.