Re: Foreign key in Oracle Sql

From: Tony Andrews <andrewst_at_onetel.com>
Date: 19 Jan 2005 08:36:58 -0800
Message-ID: <1106152618.369720.187290_at_c13g2000cwb.googlegroups.com>


David Cressey wrote:
> > Given that those other products didn't exist when Oracle was
created.
> > And given that those that have worked with Oracle for almost 20
years
> > have a large volume of working code they don't want broken. And
given
> > that it really doesn't matter ... what's your point other than
whining?
>
> My point is not whining. In fact, my general opinion of Oracle is a
> favorable one.
> But if they get something wrong, it deserves to be called wrong.
Especially
> in the context of this thread, where somebody is using Oracle
behavior to
> prove the point to somebody else.

I'm afraid you are flogging a dead horse. Some people's love of Oracle is so blind that they cannot admit it has any faults whatsoever: Mr Morgan may be one of those people. (OTOH, some people's hatred of Oracle is so blind that they cannot admit it has any virtues whatsoever: Mr Celko may be one of those people ) ;-)

Now I too love Oracle, but (being perfect ;-) can also see that it does get one or two things wrong, and that this is one of them. I can also sympathise with Oracle that it got it wrong before there was a standard to follow, and that it would be a nightmare to try to correct it now (though perhaps the thought of doing so is behind the warning that VARCHAR may be different from VARCHAR2 in the future).

"It doesn't really matter" that Oracle treats '' and NULL as being the same, but:
- the inconsistency is unsatisfying (LENGTH('') returns NULL but 'abc'||'' returns 'abc')
- having to write NVL(LENGTH(string),0) all the time is a PITA
- it causes developers who move from other DBMSs to Oracle to create code with bugs like "where middle_name = ''" Received on Wed Jan 19 2005 - 17:36:58 CET

Original text of this message