Which of the following databases is best for a big desktop application: Firebird, JavaDB, hsqldb ? I need performance, easy of use, and totally free license.
7 Answers
If you're looking for an embeddable database, my recommendation would be H2 (stands for Hypersonic 2, (re)written by the author of HSQLDB). See the detailed comparison of features and of performances.
Using a 100% Java database would allow to run it in the same process and make things a lot easier IMO.

- 562,542
- 136
- 1,062
- 1,124
-
4@BalusC I have dropped hsqldb and javadb in favor of H2, I just love it. And its [compatibility mode](http://www.h2database.com/html/features.html#compatibility) (it can "behave" like, say Oracle, DB2, etc) is wonderful for testing. – Pascal Thivent Apr 28 '10 at 23:37
-
Hey, that's nice. I must admit that I didn't knew that it stands for Hypersonic 2. That will be a new toy to play with sooner or later :) – BalusC Apr 28 '10 at 23:41
-
+1 The project is well maintained, and the author often participates in http://groups.google.com/group/h2-database – trashgod Apr 28 '10 at 23:54
-
1
-
-
To EMBED a H2 db programatically - http://stackoverflow.com/questions/154636/embedding-the-java-h2-database-programmatically – Erran Morad Aug 29 '14 at 06:22
Let me recommend you on Postgres (http://www.postgresql.org/ ), which is one of the best freeware DB's I know.
I had an experience with this DB in my previous project, in which we held ~20 tables in the schema, the largest table had ~100,000 rows, and the amount of total data was not that big.
This project is running in production for more then 2 years, and there weren't any special problems with it.
Shay

- 913
- 1
- 7
- 26
-
6If he's shipping a desktop application it's probably advantageous not to have users install a separate database application, hence the OP has given a suggestion of JavaDB and hsqldb, both of which can be embedded in Java applications. I'm not sure how Firebird fits into that though. Of course, this is in no way a dig at Postgres, which to my mind is the obvious choice whenever a database is required: Desktop or Server. – Geoff Apr 28 '10 at 23:20
My recommendation is H2. I recently migrated a db (from MS SQL server) including 2 larger tables hosting >2 million rows each. First I tried Derby and had issues (not only performance) - then I switched to H2 and migrated everything successfully.

- 41
- 1
I think you'll be better off with an embeddable database for this. HSQLDB or H2 would work, as would SQLite. SQLite is quite popular outside the Java world (it's used by the Mozilla project, for instance). I'm not familiar with JavaDB, so I can't speak to its capabilities.
SQLite is known to be pretty fast.

- 28,379
- 9
- 61
- 93
Firebird is very good database especially for desktop application
There is good java driver.

- 6,755
- 3
- 34
- 59
-
2Especially for 'big desktop applications'. Firebird scales to hundreds of gigabytes and beyond. – Douglas Tosi Apr 29 '10 at 14:54
Depends on requirements and data amount. My last choice was MySQL and it was very comfortable (swing app)

- 18,367
- 27
- 104
- 155
I would go for a DBMS that is not Java-specific. You may want to share your data with a C++ or .NET application some day. If it does not need to be client/server consider SQLite or H2. If it does then consider Postgres. All of these have ODBC drivers and/or drivers for specific languages other than Java.

- 47,861
- 24
- 143
- 221