Saturday, June 6, 2009

H2 simplicity

The H2 database start off is purely brainless. You just click on the H2.jar or something like that and you are off, it launches an internal server (web and servlet server and database server) and your default web browser just pops up a web servlet for you to connect to your database and you are in. You manipulate tables and data using the servlets and forms. I love the pure simplicity and brainlessness of using H2.

The build of H2 jars can be a bit complex since you need to setup JAVA_HOME and paths here and there but these are the fault of Sun Java because they don't automatically provide these setups and leave users hanging there and to figure out for themselves. Otherwise, when all thes eenvironment values are up, the building of different H2 jarfiles for different uses are purely brainless too. Just open a console and 'cd' to the 'bin' folder and type 'build xxx' where xxx is whatever kind of jar you want to build. Simple isn't it ?

If you like consoles to access databases, H2 also provides console (main jar rather than the rebuild jarSmall version). The console is as simple as just 'java -jar h2.jar' . What else can you expect ?

Look at other databases... do they provide such simplicity and luxury ? Java DB aka Derby ... I wanted to learn how to use it but just a glance at the manuals and it put me off...

Overly complex and untidy documentations. Looks of setups here and there, console without any GUI... not simple to use in general. Derby really need to do something to make it's manuals easy to use. I know some have gotten use to the doc in Derby but how about beginners ? Given the choice of H2 and Derby, I think people would prefer H2.

I am not bias towards H2, but the fact is H2 clearly won hands down by it's simple, brainless , usability. When I started to find a java database, H2 and Derby are the options I have. But I move towards H2 and consequently use H2 as my default database whether for storing data or for using them in my software products since it's so easy to handle compared to Derby.

H2 have consistently always try to be considerate to it's users by making it easy to use and that is the very strength of H2.

If you don't believe, try downloading the latest H2 database and use it and also download a Derby and use it. Within seconds after you install or unzip H2, the next thing up and running is a H2 ... or maybe let's leave it for you to experiment and see for yourselves.

No comments: