H2 versus Firebird for java desktop application

418 views
Skip to first unread message

blow

unread,
May 18, 2010, 6:30:47 PM5/18/10
to H2 Database
I have to chice a database for my java application, there are some
comparison articles about this great database?

Thank you.

blow

--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.

Wildam Martin

unread,
May 19, 2010, 3:09:06 AM5/19/10
to h2-da...@googlegroups.com
We had a 3rd party project that used firebird (don't know in which
version) and there were problems with it. unfortunately I do not
remember more details, maybe it was some unexpected small db file size
limitations and maybe something else. Is about 3 years ago, but I
stopped watching that project.

I had a short look now. If you need also Windows users to access the
DB, maybe Firebird is better regarding the ODBC driver available. But
this is just a guess.

I also noticed that Firebird is in my Ubuntu repository - that is also
an advantage (for me - not sure if for you).

If you want to use an embedded database I - again just a gut feeling -
would prefer H2. If you want to offer different applications direct
access to your database Firebird may be a good/better alternative.
--
Martin Wildam

Home: http://sites.google.com/site/mwildam/
Life Hack Blog: http://1-2-solved.blogspot.com
IT Blog: http://it-tactics.blogspot.com

Panayiotis Vlissidis

unread,
May 19, 2010, 3:29:52 AM5/19/10
to h2-da...@googlegroups.com
We were using Firebird for about 5 years and replaced it 
with H2 about 1.5 year ago.

The main reason we changed was that we needed to switch
to an embedded Java database that required no further installation
(the program is installed on off-line remote locations, mainly ships).

H2 is exactly that and adds at least the following benefits:
1) Very small deployment size (~1MB vs ~6MB for the installer)
2) Performance (H2 is faster although I dot have any hard facts)
3) No separate installers need to be distributed per OS/architecture 
    (H2 is fully implemented in Java)

Finally we never had a corruption or such other issue with H2
and has been rock-solid for us, hence we never looked back.

Although as Martin said if you plan to use it for several applications
of which some may be non-Java then I am not sure if H2 would be the
best choice.

Hope that helps.

Best regards,
Panayiotis

Wildam Martin

unread,
May 19, 2010, 5:01:33 AM5/19/10
to h2-da...@googlegroups.com
On Wed, May 19, 2010 at 09:29, Panayiotis Vlissidis
<pvlis...@gmail.com> wrote:
> 3) No separate installers need to be distributed per OS/architecture
>     (H2 is fully implemented in Java)

This was for me a big plus, because I can develop a single-jar-app -
full functional by downloading and double-clicking a single jar file.
--
Martin Wildam

Dario Fassi

unread,
May 19, 2010, 2:04:14 PM5/19/10
to h2-da...@googlegroups.com

El 19/05/10 06:01, Wildam Martin escribió:
> On Wed, May 19, 2010 at 09:29, Panayiotis Vlissidis
> <pvlis...@gmail.com> wrote:
>
>> 3) No separate installers need to be distributed per OS/architecture
>> (H2 is fully implemented in Java)
>>
> This was for me a big plus, because I can develop a single-jar-app -
> full functional by downloading and double-clicking a single jar file.
>

For us this was a big advantage that make possible to deploy and update
application and populated database via Java Web Start to many remote sites.

blow

unread,
May 19, 2010, 7:34:15 PM5/19/10
to H2 Database
What about H2 server-mode? Ok it is great embeded database, but when
run in server mode is good too?
I have read H2 is immature for client-server application, and has some
problems with table lock and concurrence db access, is this true?

So, is H2 recomended for client-server application and is reliable and
fast in this mode like in emebeded mode?

Thank again.

Blow

Ewald

unread,
May 20, 2010, 2:26:22 AM5/20/10
to H2 Database
Hi.

I'm a bit different from most of the responders as I use H2 in mostly
client-server mode. The setup I use is a dedicated server
installation, a Windows machine no less, that starts H2 as a service.
My client machines then connect to this server (all Linux or Windows
machines, TCP/IP, Java6) and update and retrieve information from the
database. Currently, I have about 11 million records that are being
accessed simultaneously by around 5 - 8 users. I can tell you that the
only bugs / problems I've experienced in related to code I wrote. As
far as I can tell, we haven't suffered dataloss with H2, it's response
times are excellent (once properly configured) and it is certainly
working very well for me.

The trick with running in "server" mode is to allocate enough RAM to
the VM (I allocate 1GB) and set the DB Cache to 256mb, this way, the
system works fantastically well for me. I'm still using a bit older
version of H2 though, 1.1.118 if I'm not mistaken. It works for me and
I've used it in smaller C/S applications as well with just as great a
result.

Best regards
Ewald
Reply all
Reply to author
Forward
0 new messages