it's not that simple
Posted Apr 7, 2008 14:52 UTC (Mon) by
nix (subscriber, #2304)
In reply to:
it's not that simple by liljencrantz
Parent article:
Sun Microsystems' Next Linux Move (Seeking Alpha)
* Null is the same as an empty string.
Now, now, don't go casting false aspersions. They changed this, silently:
NULL is now the same as an empty string *in WHERE and HAVING clauses only*
except that if the optimizer chooses to do particular things to your query
or your database has particular patches, it isn't.
Isn't that clearer?
Remember also its lovely flow analysis in the vile abomination that is
called Pro*C: pass an uninitialized char array into the *OUT parameter* of
a PL/SQL function, or into a SQL statement's INTO clause, and it does no
flow analysis at all and strlen()s the uninitialized string prior to
sending it to the server. Great design, guys.
(I'm not even getting into Pro*C's other manifold faults because this post
would be 300K long.)
* Varchars can't be longer than 4000 characters, for anything longer, you
have to use clobs, which are glacially slow.
And PL/SQL can only manipulate clobs by cutting them into pieces (whose
maximum length is the same as the maximum length of a VARCHAR, which is
not 4000 characters in all situations but rather depends on your *database
character encoding*) and manipulating them that way!
* Oracle uses two different but very similar languages, SQL to perform
simple queries and PL/SQL to define functions, procedures, etc. These
languages have different definitions of the basic types, e.g. the maximum
length of a varchar variable is different in the two, one has a boolean
type, the other does not.
It's worse than that. There are separate implementations of PL/SQL in each
of Oracle's products. These are different languages with distinct bugs,
different 'specifications' (most nowhere documented that I can find) and
sometimes-diverging development histories. There is no way to find out
which language/VM you are running against at compile- or runtime. Many of
the bugs are catastrophic: e.g. Oracle Forms 9's PL/SQL implementation
allegedly supports the CLOB and TIMESTAMP types, but if you use it the
Forms frontend sprays incomprehensible errors at you (in the latter case)
or instantly terminates (in the former).
Remind me why Oracle is better than MySQL?
I'm a PostgreSQL man (just never used MySQL much and heard enough about it
to stick with what I like). It has faults (the lack of full support for
table inheritance for one) but like it or not at least they
try for
consistency, which is something that's wholly lacking from the big
database vendors.
(
Log in to post comments)