Saturday, March 21, 2009

Java DataBases - Derby(Java DB) & HSQLDB

These are those two 100% Java databases, Derby and HSQLDB.

Apache Derby is developed as an open source project under the Apache 2.0 licence.
Derby was previously distributed as IBM Cloudscape.It is currently distributed as
Sun Java DB and comes packaged along with Java.

HSQLDB (Hyperthreaded Structured Query Language Database) is a relational database
management system written in Java.

Derby aims to be a fully functional relational database, and as such could be considered
as an alternative to "grown up" databases like Oracle and MySQL in some cases.

HSQL is more like a "toy database", providing a subset of the features of a fully
functional databases. But that subset of functionality may be all you need.

Benefits of HSQL over Derby.
- light weight (smaller libraries, less complex)
- supports in memory databases
- Simple to use

Benefits of Derby over HSQL
- much larger development community
- secured future (is part of JDK, is sponsored by IBM and Sun)
- More complete feature set (e.g. proper handling of transactions, encryption...)
- Scalability
- Performance with large Data Set

Memory Use

Derby is setup like a traditional database system where data is stored
on disk and a subset of that data is cached in a buffer cache or pool.

HSQL by default uses MEMORY tables (for standard CREATE TABLE
statements), this always stores the entire data in memory. Thus this is
fast, but obviously consumes memory. It is useful to look a process
sizes as well as absolute times when running benchmarks.


No comments:

Free Domain Names @!