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

  • From: "Mark W. Farnham" <mwf@xxxxxxxx>
  • To: <VerreyB@xxxxxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 1 Aug 2005 19:11:59 -0400

Quite simply, and the most easily understood example I know, some people
have no middle name.

In that case, the value of the string of that person's middle name is not
NULL, but rather the
accurate value for the person's middle name is the empty string. The value
is absolutely known,
whereas the NULL value is definitely not known.

I don't know a better way to explain it than that.

Regards,

mwf

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Billy Verreynne (JW)
Sent: Monday, August 01, 2005 4:08 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: RE: Counterquestion - is Oracle a He or a She - or an It or a
hermaphrodite



Lex de Haan [mailto:lex.de.haan@xxxxxxxxxxxxxx] wrote:

> well, I don't want to start a religious thread here, but I think it
is a
> problem that Oracle treats empty strings as nulls. an empty string
is a
> string, allbeit a short one (just like an empty set is a set, though
a
> small one) and thus has a datatype. a null is a marker, not a value,
and
> has no datatype. therefore, there is (or should be) an important
> difference between empty strings and nulls.

Lex, then why is a NULL numeric not confusing then?

Can you get an "empty" numeric variable? No! It is a null variable.

Why treat a string variable differently then?

A numeric variable either has a value (-1, 0 or billions). Or not.
When it does not have a value it is considered a NULL.

A string variable is no different. There is no such thing as an
"empty" string. Just as there is not such thing as an "empty" numeric,
or an "empty" date, or an "empty" bool, or an "empty" pointer, or an
"empty" <insert your favouriote datatype here>. It is either NULL or
it has a value. AS SIMPLE AS THAT!!

So why treat string variables differently than all other data types!?
Magically we now have "empty" strings despite the fact that an "empty"
variable in ALL other data types are considered null. Does not
compute.

Nothing religious about it. Unless common sense and logic are
considered a religion?

--
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
//www.freelists.org/webpage/oracle-l


--
//www.freelists.org/webpage/oracle-l

Other related posts: