views:

244

answers:

3

Hi, i have to choice a database to use in server-mode for a java desktop application.

I think both are great java database.

In my opinion (im NOT well-informed):

H2 PRO

  • Is java based
  • Develeopment say it is very very fast
  • Easy to install, configure and use with java application

H2 CONS

  • Is a young project
  • Reliability doubt for commercial porpouse

FireBird PRO

  • Rock solid project
  • Well documented
  • Should be fast and well optimized for large data
  • Has a java driver...

FireBird CONS

  • It is not java based
  • ... ?

So, i can't choice between this great db, can i have a suggestion?

Thank.

+4  A: 

H2 - is not that immature, it's actually got a lot of history - HSQLDB came before it.

It's also easy to test, since you just include the jar in your test classpath and you're away. It can also run in-memory, which is also great for unit testing.

I tend to go for a pure java stack unless there is a strong reason not to. Simplifies testing and installation, and using a java stack there is generally less chance of platform idiosynchrasies creeping in, since the vm operation and basic I/O apis are solid and compatible across the major platforms.

But if you're really unsure then try it. JDBC/Spring/Hibernate and most database access layers are db-agnostic, so changing database is often little more than changing the JDBC driver URL. If you are using custom SQL, then use a query builder so these can be easily migrated. Then you can try both databases and make a switch easily if you later discover you made the wrong choice, or a new option becomes apparent.

mdma
Thank you, so if i started with H2 and then i decide to migrate to firebird i can do it easly? or vice-versa...
blow
Yes, although exactly how you do this depends upon how you access the database. E.g. if you are using hibernate, it provides dialects for various dbs - firebird is a subset of sql-92, or supports the old Informix syntax, both supported by hibernate, and H2 is also supported by hibernate. If you are using a JDBC access layer, such as Spring JDBC, and are coding SQL by hand, then use an SQL builder, so that the SQL can be easily changed without hunting through all your code. For example: http://openhms.sourceforge.net/sqlbuilder/
mdma
+1  A: 

In my opinion, H2 is allmost only for Java World even if I see there is drivers for dotnet.

Firebird is more open because it have more drivers and access components.

Firebird have more GUI Administration tools.

Hugues Van Landeghem
H2 options for .net:http://h2database.com/html/advanced.html#odbc_driverhttp://h2database.com/html/advanced.html#microsoft_dot_net
Andrew Fink