Re: Nullology of empty strings

From: Steve Kass <skass_at_drew.edu>
Date: Wed, 08 Jan 2003 10:16:15 -0500
Message-ID: <avhf8j$rui$1_at_slb3.atl.mindspring.net>


David,

  Of course behavior shouldn't depend on the details of implementation - behavior should hide the implementation. But even so, I would expect a varchar of length zero to begin with nothing. Why is there a zero byte or any other byte in a datum that should contain no bytes at all?

SK

David Cressey wrote:

>I believe that the nullology of empty strings in Oracle is a side effect of
>the internal format for null fields, and for Varchars.
>In Oracle, any field whose first byte is zero is a null field. Also, a
>varchar of length zero begins with a zero byte. Oops.
>
>As TimX already pointed out this is not guaranteed for future versions of
>Oracle.
>
>Just be glad they didn't do the same thing with the number zero.
>
>FWIW, Oracle bought another database from DEC (Digital) in 1994. That
>database engine, now called Oracle Rdb,
>gives the answer FALSE for "is null (empty)". Oracle Rdb uses a bit vector
>to indicate missing data, and doesn't use those bits to represent anything
>else. Hence there are no homonyms for null.
>
>--
>Regards,
> David Cressey
> www.dcressey.com
>
>
>
>
Received on Wed Jan 08 2003 - 16:16:15 CET

Original text of this message