InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

HyperSQL 2.0 - New Release 5 Years In the Making

Posted by Josh Long on Jun 18, 2010

Sections
Operations & Infrastructure,
Enterprise Architecture,
Development,
Architecture & Design
Topics
Java ,
Persistence ,
Open Source ,
Data Access ,
Unit Testing ,
Modularity
Tags
Database Management ,
Database Replication ,
Database ,
Apache Derby ,
Hypersonic DB

HyperSQL 2.0 was released on the 7th of June. This release marks the first since HSQLDB 1.8 came out more than 5 years ago. HSQLDB 1.8 has since been integrated with many tools, frameworks and applications, including the ubiquitous OpenOffice 3.2 productivity suite where it provide an embedded database option to handle use cases where one might otherwise use Microsoft Access. HyperSQL is 100% Java, and provided under the BSD license.

The new version boasts more features than any other open source database engine available. It debuts new SQL capabilities, increased scalability, query optimization, as well as some net-new features.

The core of HyperSQL is fully multi-threaded. It supports two-phased locking and MVCC (multi-version concurrency control), both of which are mechanisms for contending with concurrent access to the database's resources. MVCC, for example, is also employed by other databases like PostgreSQL. In addition to the already supported transaction control modes SERIALIZABLE and READ COMMITTED, HyperSQL 2.0 adds support for two new isolation levels equivalent to the REPEATABLE READ and READ UNCOMMITTED isolation levels.

Major components – including the SQL scanners and parsers – have been rewritten, featuring nearly complete support for ANSI-92 SQL and SQL:2003, as well as many SQL:2008 features (including many optional extensions). This support permits many new expressions and constructs like the BETWEEN clause, OVERLAPS predicate, multi column IN expressions, MERGE statement, and MATCHES predicates. In addition, HyperSQL 2.0 supports the full syntax for trigger definitions in both SQL and Java, as well as read-only and updateable views. Support for generation of SEQUENCE types has been added to ease unique number generation. The new version includes support for various data types, including BIT types, CLOB, BLOB, and the SQL standard INTERVAL type. TIME support has been enhanced and includes a fractional second parts, as well as support for timezones. Array types are available and can comprise most of the other types available. Additionally, the engine will make use of all available indexes where possible, in JOIN clauses, WHERE clauses, IN queries, and aggregate functions like MIN, MAX, and ORDER BY expressions. The new version supports stored procedures and functions. The stored procedure language also includes support for procedural constructs like WHILE loops, IF, CASE WHEN, and exception handling statements, as well as aggregate functions. These functions can be defined in SQL, or in Java. If they're written in Java, then niceties like polymorphism are available.

HyperSQL 2.0 features many smaller changes that will make management and usage easier. The new version increases storage sizes for general types - up to 256GB – and adds support for BLOB and CLOB data, supporting up to a total of 64 terabytes. It sports an updated JDBC 4.0-compatible driver, and Java 1.6 support. Notably, the getGeneratedKeys() method on the Statement and PreparedStatement interfaces are now supported, which will – among other things - make working with some ORM tools easier.

All in all, a feature-packed release. The project has proven very popular as a testable environment and a solid embedded database option. HyperSQL seems to have the most mindshare, but faces competition from the likes of H2 – created by Thomas Mueller, the original author of HyperSQL - and Apache Derby (formerly IBM's CloudScape), which is included with JDK 6 as JavaDB.

To find out more, consult the HyperSQL web site.

HyperSQL 2.0 by Andy Jefferson Posted
H2 and Hypersql 2.0 by Matt Giacomini Posted
Re: H2 and Hypersql 2.0 by Thomas Mueller Posted
  1. Back to top

    HyperSQL 2.0

    by Andy Jefferson

    Some very welcome improvements ... and all supported in current DataNucleus AccessPlatform for those people wanting flexible well performing JDO / JPA persistence.

    --Andy (DataNucleus)

    PS, think you have a typo in para 3, should be READ_UNCOMMITTED as being added.

  2. Back to top

    H2 and Hypersql 2.0

    by Matt Giacomini

    Does Thomas Mueller still work on both code bases?

  3. Back to top

    Re: H2 and Hypersql 2.0

    by Thomas Mueller

    No, I stopped working on Hypersonic SQL / HSQLDB since quite a long time. I fully work on the H2 database now (well, 'fully' is the wrong word - it's still a hobby mainly).

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.