Summary
JavaDB is Sun's branded release of the open-source Apache Derby Java relational database. JavaDB 10.2 will be bundled with JDK 6, providing a built in JDBC 4-compliant development database. Artima spoke with Bernt Johnsen, Sun's JavaDB chief engineer, about the 10.2 release.
Advertisement
The Apache Derby project released the 10.2 beta version of its open-source Java relational database. A final release of the latest Apache Derby, and JavaDB, is expected for September.
JavaDB is Sun's branded version of the Apache Derby database, which IBM contributed to the open-source community in 2004. Derby graduated from Apache incubator status in 2005, and Sun soon threw its support behind Derby as part of that company's Java database strategy.
At the moment, JavaDB is merely a Sun-branded release of Apache Derby, allowing Sun to offer support contracts on the product, according to Bernt Johnsen, Sun's chief JavaDB engineer. Soon, however, JavaDB may play a more prominent role, as Sun slated this small-footprint database for inclusion in the upcoming JDK 6 release.
"The plan is to provide a service to developers so that they can have a standard database right in the core Java development environment. It is not meant to be part of JRE 6," says Johnsen. JRE 6 is the next version of the standard Java runtime distribution.
Johnsen expects that developers will initially use JavaDB for testing database applications. "JavaDB has an embedded mode where you can directly start the database inside your application. But you can also start JavaDB in server mode, and access it via a network client [JDBC] driver. It's also possible to combine those two modes, where a client might start the database in embedded mode, but that client might also communicate with another database on the network that's operating in server mode. That allows you to test the true client-server aspects of your application, while also letting you perform fast local testing."
Compared with other small-footprint Java databases, such as HSQLDB and H2, JavaDB acts more as a traditional database, according to Johnsen. "Because JavaDB was designed as a traditional database, you can use it more like a real database. It has all the ACID properties. Some of the other databases in this space are weak on the durability side, for example. You also gain speed from the concurrency support that JavaDB is very good at handling."
JavaDB currently supports the mandatory parts of the SQL 2003 standard, and even some optional SQL features. Support for XML data types was added in 10.2, and the latest beta ships with a JDBC 4 driver. As well, the 10.2 version supports updatable and scrollable result sets, as well as grant and revoke statements.
Perhaps the most interesting new 10.2 feature is online backup. "Prior to 10.2, you could back up a database without bringing the database server [process] down, but you had to stop updates to the database during backup. With 10.2, you can perform update operations on the database during backup. I am not aware any other Java-based database having a similar feature at the moment," says Johnsen.
Because JavaDB is essentially Apache Derby, an open-source project, Johnsen was not able to confirm specific features planned for subsequent releases. However, one such feature might be replication of live databases, a capability already offered by MySQL, for example.
Johnsen notes that such features will make JavaDB an increasingly attractive option for deployment as well. "There are a lot of small and medium-size applications for which JavaDB is an excellent choice. It can currently support gigabyte-size databases and several hundred concurrent database connections." While JavaDB does not currently support terabyte databases, it might in the future, says Johnsen, adding that larger database support is chiefly a matter of providing features for applications requiring such large databases. "If you were to use it for databases supporting many applications, you would probably miss several features enterprise databases routinely offer."