ArticleslgStudy

computer science

HSQLDB

HSQLDB is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand HSQLDB rather than just read about it. In short: HSQLDB (Hyper SQL Database) is a relational database management system written in Java. It has a JDBC driver and supports a large subset of SQL-92, SQL:2008, SQL:2011, and SQL:2016 standards.

HSQLDB — main illustration
HSQLDB — illustration

Key takeaways

  • HSQLDB belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect HSQLDB to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of HSQLDB from memory before moving on to harder problems.

Reference excerpt

HSQLDB (Hyper SQL Database) is a relational database management system written in Java. It has a JDBC driver and supports a large subset of SQL-92, SQL:2008, SQL:2011, and SQL:2016 standards. It offers a fast, small (around 1300 kilobytes in version 2.2) database engine which offers both in-memory and disk-based tables. Both 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 implementations such as Kaffe. HSQLDB is available under a BSD license. It is used as a database and persistence engine in many open source software projects, such as descendants of OpenOffice.org Base (i.e., Apache OpenOffice Base, LibreOffice Base, etc.), and the Jitsi VoIP and video-conference client since version 2.6. It is also used in commercial products, such as Mathematica and InstallAnywhere (starting with version 8.0).

Transaction support HSQLDB version 2.0 has three transaction control modes. It supports read committed and serializable transaction 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.

Data storage HSQLDB has two main table types used for durable read-write data storage, i.e., if a transaction has been successfully committed, it is guaranteed that the data will survive system failure and will keep their 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 are reconstructed into the memory. Another table type is CACHED, which allows one to store more data, at the cost of the slower performance. The 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 access to comma-separated values (CSV) files. 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 many 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 and JDBC 4 Specification. Version 2.3.2 (released in 2014) is fully multi-threaded and supports high performance two-phase locking and MVCC (multiversion concurrency control) transaction control models.

See also

List of relational database management systems Comparison of relational database management systems Apache Derby H2

References

External links

Official website

Illustrations

HSQLDB illustration

Worked examples

Example 1 — a first encounter with HSQLDB

Start with the simplest possible case. Write down what HSQLDB claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to HSQLDB before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about HSQLDB ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of HSQLDB

In research
HSQLDB appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses HSQLDB in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
HSQLDB is common in secondary-school and first-year university syllabi. It links to neighbouring topics Database engines, Embedded databases, Free database management systems, so understanding it makes those chapters shorter.
In everyday life
Look for HSQLDB outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “HSQLDB” →

How to study HSQLDB in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what HSQLDB means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain HSQLDB out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is HSQLDB in simple terms?

HSQLDB (Hyper SQL Database) is a relational database management system written in Java. It has a JDBC driver and supports a large subset of SQL-92, SQL:2008, SQL:2011, and SQL:2016 standards.

Why does HSQLDB matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study HSQLDB?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on HSQLDB.

Tags

  • Database engines
  • Embedded databases
  • Free database management systems
  • Free software programmed in Java
  • Relational database management software for Linux
  • Relational database management systems
  • SQL
  • Software using the BSD license

Keep exploring