Quantcast
Channel: Developing Software in J2EE
Viewing all articles
Browse latest Browse all 10

HSQLDB – What a piece of …..

$
0
0

First, I know I haven’t posted in a while… I’ve been extremely busy.  Will there be more posts sooner rather than later?  Probably not.  But I’ve not abandoned this project.  I just need to find some time and I don’t have any right now.

Now, on to the post.

I needed a small lightweight database that I could embed in an application that I was writing.  I looked around (not very hard) and came across HSQLDB and just picked it at random more or less.  What a piece of crap this database is and here’s why:

1. I’d had the database up and my tables created and I needed to add a new column.  The database would not let me.  Gave me some ridiculous error message about “String data right truncation”. I don’t have the full error message, and would rather not post it to be honest in case a search engine picks it up (and some poor soul thinks I have the answer) but it was esoteric and useless.  I saw some post somewhere about copying the data out of the table into a temp table and then back.  Crazy.

2. I use NetBeans for my IDE.  I also use it for manipulating my databases.  It’s not the best but it does most of my work for me.  When you do a simple select, NetBeans limits the number of rows to 20.  Every time I tried to do a select, with an HSQLDB database, with NetBeans, and the table had more than 20 rows, it would crash. CRASH!  Some form of nullpointerexception.  If I changed the number (20) to greater than the number of rows in the table, everything was fine.

3. The final straw was when it started dropping data.  The application I wrote, would start up the database, put data in it and then shut it down.  If there were 2 rows, the final row would get lost.  To be fair, this could have been my application that did this (although I don’t think so).  Because it really felt like it wasn’t flushing the data from memory into the database.  I say this because if the database was just “running” and I would run the application then both rows would get put into the database.  Again, I don’t think so though.  The database shouldn’t drop data.

So, I’m done with it.  HSQLDB is a complete piece of crap as far as I’m concerned.  I’m looking at Derby at the moment.  It seems much more stable.



Viewing all articles
Browse latest Browse all 10

Trending Articles