views:

323

answers:

6

Is there a "best" or more popular database for standalone Java app? I'm currently writing by hand, but I would like to know what is commonly done, if there is something that is commonly done.

update: talking about small app (may grow, but its small for now)

+6  A: 

I would suggest using something like SQLite with SQLiteJDBC.

It also sounds like HyperSQL and Derby (which ships with certain Java versions) are popular choices.

Justin Niessner
I love SQLite - especially for small apps. It's really easy to embed it and start using a DB.
SB
Using JavaDB, looks very nice. SQLite look good too, but I find a better tutorial for JavaDB. Choose you as right because you cited both.
Tom Brito
+2  A: 

The question is: What do you understand under "best" ? My suggestion H2 which is embedded..

khmarbaise
generally speaking
Tom Brito
+5  A: 

Java 6 ships with Derby (renamed JavaDB). It can be used in memory or server mode.

HyperSQL (HSQLDB) is also popular.

duffymo
edited, providing links and fixing the names :)
Bozho
+1  A: 

For development purposes, I often use the Hypersonic SQL Database (HSQLDB). It's fast and lightweight, and good enough to get started. For a bigger application, I'd go for Derby, which supports more options.

Olivier Croisier
A: 
  • HSQLDB is a well-established option.
  • JavaDB comes with the development kit
Michael Borgwardt
+1  A: 

The main competitors - HyperSQL (HSQLDB), JavaDB (Derby) and SQLite (not java-based) were mentioned.

There are a few other options:

  • db4o - object database
  • FirebirdSQL - not java-based.
  • Jackrabit - a content repository (not RDBMS) supporting embedded mode.
Bozho