Puakma: Under the hood

I'm Brendon Upson, jack-of-all-trades, master of one or two. I'm talking about life running a small ISV tackling business issues and leaping technology hurdles in a single bound.

webWise Network Consultants is based in Sydney, Australia and develops the groundbreaking Tornado Server technology.

Tornado does Oracle 10g

Filed under: by Brendon Upson on 2009-07-07

Let me start by saying for an "industry standard" database I was deeply underwhelmed. I'm no Oracle DBA (so let the flaming begin). As I see it, Oracle has 3 major weaknesses, first to actually CREATE a new database is a huge effort and requires new management ports opened in the firewall to administer the instance. Second the JDBC implmentation is not as complete as you would expect. Third, its handling of NULLs vs empty strings is questionable at best.

As you may have guessed, last week involved porting Tornado to use Oracle for its system tables. Boy did I learn a lot.

The database creation thing is merely a comment on scalability. Sure if you have a ton of hardware and a team of DBAs, then this is not so much of an issue, but then I guess if you can afford the software, you'll probably have these things.

The JDBC implementation screwed me over badly. In particular ResultSet.getBytes(). Foolishly I expected this method call to return me the bytes stored in that column. Sadly, Oracle returns 86 bytes every time. It seems the 86 bytes are a blob locator. Why the programmers at Oracle would ever think any human might want the blob locator is well beyond me. So, if you're using Oracle JDBC and blobs, be sure to deal with streams only.

Finally, the NULL handling really killed me. With Oracle if you write an empty string "" to a column, the server will store it as a NULL. Apparently this goes way back before ANSI database standards were written and Oracle do not want to change the behaviour for their existing customer base. OK, I get that, users now expect a certain behaviour. How about a config setting in the database so we can choose to be standard or not?? ANSI92 was written 17 years ago..... What makes this more painful is you cannot write a query "...WHERE ColumnX=NULL" you must write "...WHERE ColumnX IS NULL". Apparently NULL is "unknown" and unknown!=unknown.

Feels good to get that out of my system.