Showing posts with label sql. Show all posts
Showing posts with label sql. Show all posts

Monday, February 2, 2009

Oracle

Ok, where do I begin?

How about at the beginning? The Oracle installer for Windows is not an MSI. Put another way, the installer for Oracle is a Java application. Do I look like I wanted a JRE installed? This makes for a poor user experience indeed, with one of those really ugly GUI:s one has come to expect from Java. In fact, I have yet to see a pretty Java application. I guess nobody ever had the patience to figure out quite how to use the CrapBagLayout, but I'm getting sidetracked from the rant at hand! Hilariously ill-designed installer in any case.

Secondly, a web application for administration of the database(s). Dudes, how about a proper application? Whatever, I'll just let this one slide, because at least it's a slight improvement over the horrendous installation.

Ah, services. Five of them have been registered at a cursory glance, but as of right now, only three of those are running. So WHY is it then, that my computer's boot time has been at least quadrupled? It's noticeably slower on shutdown as well. Brilliant Oracle, thanks.

Also, and this is more important, why is Oracle continuously running short processes, starting and stopping all the time, in the background? That's not all either, have a look at this screenshot (courtesy Process Explorer) of a sample of the Oracle processes running on my system right now.


What's that now? An exe running a shell command running Perl running a shell command running Java? Seriously? What could it possibly be doing? I shudder lest I were to find out.

Oh, and then there's the database itself of course. No one in their right mind would ever EVER want to be a DBA, but as a dev there are unfortunately times when one has to bite the bullet, so let's create some tables. Oh I need a "tablespace" first? Fine, whatever. CREATE already!

Wait what? There is no auto incrementing ID type? No you heard that right, but obviously there is a way around this, because otherwise the thing would be completely useless, so here's what you have to do: create a "sequence". Meaning, you have to do something like this:

CREATE SEQUENCE supplier_seq
     MINVALUE 1
     MAXVALUE 999999999999999999999999999
     START WITH 1
     INCREMENT BY 1
     CACHE 20;

Then, you finally get to do this:

INSERT INTO suppliers
   (supplier_id, supplier_name)
VALUES
   (supplier_seq.nextval, 'Kraft Foods');

That, boys and girls, is LAME.

And it doesn't end there. There seems to be no way of retrieving a set of records in response to a simple SELECT query, but instead we're forced to use, wait for it, a cursor? That feels like turtle graphics to me. Stone age tech, Lord please have mercy.

I'll leave you with one more laugh. Now, we all know that a column that has not yet been assigned a value should be equal to NULL. If, for example, a string is assigned to a column, it's been assigned a value and should no longer be NULL. If, however, that string were to be the empty string '', Oracle inexplicably inserts NULL, despite the assignment. According to ISO SQL, the non-value NULL is different from the value of an empty string. Oracle, however, stubbornly treats empty strings as NULL. Well done. Maybe zero should be NULL too? That would also be an ISO SQL violation, so why not? At least that would explain the length of an empty string, which in Oracle is NULL, not zero... Scrap UNKNOWN altogether, FALSE is enough to represent NULL, isn't it? Completely defying standardization of ternary logic would probably be the pinnacle of Oracle's achievements. Colour me impressed.
Powered By Blogger