tags:

views:

74

answers:

3

I'm seeking a solution that would allow persistence without requiring an SQL server to be installed on the host and could be bundled along with a desktop application. Does such a thing exist?

+7  A: 

You could use an embeddable database written in Java like Java DB (Sun's supported distribution of Apache Derby), HSQLDB, or H2 (by the creator of HSQLDB). H2 has my preference performance wise and features wise (some comparisons here, here and here) and because of the compatibility mode with other databases (very nice when H2 is not your target database but maybe irrelevant in your context).

Pascal Thivent
Thanks Pascal. I'll have a look at those.
James P.
+4  A: 

I think you want something like SQLite (Java bindings) (a fast flat-file general purpose embeddable database).

ChristopheD
SQLite looks worthwhile too. Thanks Christophe.
James P.
SQLite (and Firebird) are good products but not 100% Java i.e. they can't run in the same Java process. This makes things more complicated.
Pascal Thivent
@Pascal Thivent: good point, a pure-java solution might be more appropriate
ChristopheD
+2  A: 

You might look at SQL Server Compact Edition. It has many of the same features as the full version of SQL Server, is free and does not require a separate installation.

Thomas