Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Counterquestion - is Oracle a He or a She - or an It or a hermaphrodite

RE: Counterquestion - is Oracle a He or a She - or an It or a hermaphrodite

From: <oracle-l-bounce_at_freelists.org>
Date: Tue, 2 Aug 2005 10:05:03 +0200
Message-ID: <445F36B0271AE1419CEE0B9589044B433747C3@TYGRRA01-XCS00.telkom.co.za>

R J Zijlstra [mailto:rmsah_at_xs4all.nl] wrote:

> As I remember, Microsoft Visual Basic makes a distinction like this:
> IsEmpty and IsNull ??
> And as we all know Bill must be a smart guy (looking at his
revenues) so
> I suppose this sais enough..

Delphi extends this even further by having 4 methods of testing for variances of null values. But do not confuse the physical implementation with the conceptual definition.

Simple example. I create a String class called TString. The class allows storage of anything up to a 2GB string and provides various interface methods to deal with that string as a CLOB, a name-value pair, XML text, CSV text, etc. etc.

When you instantiate a variable of TString it exists. Memory has been malloc'ed for that variable in your code. My class constructor was called. But no string value has been supplied yet. Thus your string variable is not null. However, no string is as yet described by that variable and thus that actual string content of that variable is "empty" and thus null.

In physical terms, the class will contain a null string. It will not yet have malloc'ed memory for storing the string as it has no idea what the size of the string will be. But the class itself has been instantiated. So you kind of have a contradiction here as the variable exists but the content it describes does not yet. So what is null and what is not null?

Now you deal with this TString class as a COM (Component Object Model) in Windows and it gets even more complexed as to what is Assigned, Not-Null, Null and Empty and so on.

All these technical issues are however the under-the-hood part of implementation. And can differ from model to model and o/s to o/s. Or between databases.

These implementation technicalities do not change the fundemental concept that a variable that does not contain a value, is null. Which means a string that has no value (and is "empty") describes nothing, does not contain a *single* byte of the value set its data type describes, and is thus NULL.

--
Billy

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This e-mail and its contents are subject to the Telkom SA Limited
e-mail legal notice available at
http://www.telkom.co.za/TelkomEMailLegalNotice.PDF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
http://www.freelists.org/webpage/oracle-l
Received on Tue Aug 02 2005 - 03:07:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US