HSQLDB
Encyclopedia
HSQLDB is a relational database management system
Relational database management system
A relational database management system is a database management system that is based on the relational model as introduced by E. F. Codd. Most popular databases currently in use are based on the relational database model....

 written in Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

. It has a JDBC
Java Database Connectivity
Java DataBase Connectivity, commonly referred to as JDBC, is an API for the Java programming language that defines how a client may access a database. It provides methods for querying and updating data in a database. JDBC is oriented towards relational databases...

 driver and supports a large subset of SQL-92
SQL-92
SQL-92 was the third revision of the SQL database query language. Unlike SQL-89, it was a major revision of the standard. For all but a few minor incompatibilities, the SQL-89 standard is forwards-compatible with SQL-92....

 and SQL:2008 standards. It offers a fast, 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
Web server
Web server can refer to either the hardware or the software that helps to deliver content that can be accessed through the Internet....

, 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
Kaffe
Kaffe is a clean room design of a Java Virtual Machine. It comes with a subset of the Java Platform, Standard Edition , Java API, and tools needed to provide a Java runtime environment. Like most other Free Java virtual machines, Kaffe uses GNU Classpath as its class library.Kaffe, first released...

.

HSQLDB is available under a BSD license. It is being used as a database and persistence engine in many open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 software projects, such as OpenOffice.org Base
OpenOffice.org Base
OpenOffice.org Base , a database module, initially appeared with OpenOffice.org version 2.0. As of 2010, it builds on the HSQLDB database engine written in Java....

 and the Standalone Roller Demo, as well as in commercial products, such as Mathematica
Mathematica
Mathematica is a computational software program used in scientific, engineering, and mathematical fields and other areas of technical computing...

 or InstallAnywhere (starting with version 8.0).

Over 350 book titles document the use of HSQLDB for application development with frameworks such as Spring Framework or Hibernate
Hibernate (Java)
Hibernate is an object-relational mapping library for the Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database...

.

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
Multiversion concurrency control
Multiversion concurrency control , in the database field of computer science, is a concurrency control method commonly used by database management systems to provide concurrent access to the database and in programming languages to implement transactional memory.For instance, a database will...

), or a combination of locks and MVCC. version 1.8.1 supports transaction isolation level 0 (read uncommitted) only.

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
SQL
SQL is a programming language designed for managing data in relational database management systems ....

 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.

Other table types allow for read-write CSV
Comma-separated values
A comma-separated values file stores tabular data in plain-text form. As a result, such a file is easily human-readable ....

-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.

SQL features

HSQLDB 2.0 supports all the core features and 148 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.

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
SQL
SQL is a programming language designed for managing data in relational database management systems ....

 and JDBC
Java Database Connectivity
Java DataBase Connectivity, commonly referred to as JDBC, is an API for the Java programming language that defines how a client may access a database. It provides methods for querying and updating data in a database. JDBC is oriented towards relational databases...

 4 Specification.

See also

  • List of relational database management systems
  • Comparison of relational database management systems
    Comparison of relational database management systems
    The following tables compare general and technical information for a number of relational database management systems. Please see the individual products' articles for further information. This article is not all-inclusive or necessarily up to date...

  • H2 (DBMS)
    H2 (DBMS)
    H2 is a relational database management system written in Java. It can be embedded in Java applications or run in the client-server mode. The disk footprint is about 1 MB....

  • Apache Derby
    Apache Derby
    Apache Derby is a relational database management system developed by the Apache Software Foundation that can be embedded in Java programs and used for online transaction processing. It has a 2 MB disk-space footprint.Apache Derby is developed as an open source project under the Apache 2.0 license...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK