HSQLDB
|
|
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (February 2008) |
| This article relies on references to primary sources or sources affiliated with the subject, rather than references from independent authors and third-party publications. Please add citations from reliable sources. (February 2008) |
HSQL Database Manager |
|
| Initial release | 2001 |
|---|---|
| Stable release | 2.2.7 / January 15, 2012 |
| Development status | Active |
| Written in | Java |
| Operating system | Cross-platform |
| Size | 7800 KB[citation needed] |
| Type | RDBMS |
| License | BSD license |
| Website | http://hsqldb.org/ |
HSQLDB (Hyper Structured Query Language Database) is a relational database management system written in Java. It has a JDBC driver and supports a large subset of SQL-92 and SQL:2008 standards.[1] It offers a fast,[2] small (around 1300 kilobytes in version 2.2) database engine which offers both in-memory and disk-based tables. Embedded and server modes are available.
Additionally, it includes tools such as a minimal web server, command line and GUI management tools (can be run as applets), and a number of demonstration examples. It can run on Java runtimes from version 1.1 upwards, including free Java runtimes such as Kaffe.
HSQLDB is available under a BSD license. It is being used as a database and persistence engine in many open source software projects, such as OpenOffice.org Base, LibreOffice Base, and the Standalone Roller Demo,[3] as well as in commercial products, such as Mathematica or InstallAnywhere (starting with version 8.0).[4]
Over 350 book titles document the use of HSQLDB for application development with frameworks such as Spring Framework or Hibernate.[5]
Contents |
[edit] Transaction support
HSQLDB version 2.0 has three transaction control modes. It supports read committed and serializable isolation levels with table level locks or with multiversion concurrency control (MVCC), or a combination of locks and MVCC. version 1.8.1 supports transaction isolation level 0 (read uncommitted) only.[6]
[edit] Data storage
HSQLDB has two main table types used for durable read-write data storage (i.e. if transaction has been successfully committed, it is guaranteed that the data will survive system failure and will keep its integrity).
The default MEMORY type stores all data changes to the disk in the form of a SQL script. During engine start up, these commands are executed and data is reconstructed into the memory. While this behavior is not suitable for very large tables, it provides highly regarded performance benefits and is easy to debug.
Another table type is CACHED, which allows one to store gigabytes of data, at the cost of the slower performance. HSQLDB engine loads them only partially and synchronizes the data to the disk on transaction commits. However, the engine always loads all rows affected during an update into the memory. This renders very large updates impossible without splitting the work into smaller parts.[7]
Other table types allow for read-write CSV-file access (these tables can participate, for example, in queries with JOINs and simplify spreadsheet processing) and read-write non-durable in-memory data storage.
[edit] SQL features
HSQLDB 2.0 supports all the core features and 148[citation needed] optional features of SQL:2008. Advanced features include user-defined SQL procedures and functions, schemas, datetime intervals, updatable views, arrays, lobs, full and lateral joins and set operations. Many non-standard functions such as TO_CHAR and DECODE are also supported. Extensions to Standard SQL include user-defined aggregate functions.
[edit] Releases
Several versions of HSQLDB have been released since 2001. Early versions were based on the discontinued HypersonicSQL database engine. Version 2.0, released in 2010, is mostly new code, written to conform to Standard SQL and JDBC 4 Specification.[8]
[edit] See also
- List of relational database management systems
- Comparison of relational database management systems
- H2 (DBMS)
- Apache Derby
[edit] References
- ^ "HSQLDB SQL Syntax". hsqldb.org. http://hsqldb.org/doc/2.0/guide/sqlgeneral-chapt.html.
- ^ "PolePosition Performance Comparison". polepos.org. http://polepos.sourceforge.net/results/html/index.html.
- ^ "Standalone Roller Demo". rollerweblogger.org. http://rollerweblogger.org/page/roller/20040707#try_roller_it_s_easy.
- ^ "Software using HSQLDB". hsqldb.org. http://hsqldb.org/web/hsqlUsing.html.
- ^ Books referring to HSQLDB. Google Books. http://books.google.com/books?q=hsqldb&btnG=Search+Books.
- ^ "HSQLDB Documentation". hsqldb.org. http://hsqldb.org/doc/2.0/guide/sessions-chapt.html#sqlgeneral_trans_cc-sect.
- ^ "HSQLDB Documentation". hsqldb.org. http://hsqldb.org/doc/guide/ch05.html#N10DED.
- ^ "The new HSQLDB". hsqldb.org. http://hsqldb.org/web/features200.html.