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

Home -> Community -> Usenet -> c.d.o.server -> Re: Why are empty VARCHAR2S always NULL?

Re: Why are empty VARCHAR2S always NULL?

From: Vladimir M. Zakharychev <bob_at_dpsp-yes.com>
Date: Thu, 22 Aug 2002 11:54:28 +0400
Message-ID: <ak25c0$lba$1@babylon.agtel.net>


Well, 0 is not nothing. That's why NULL made it into databases. I agree with Richard here - if we renamed it to NOTHING or UNKNOWN, or better yet, NO_VALUE, there could be far less confusion as to what it means. And it perfectly makes sense to treat empty string as string with no value (hence, NULL). Same as with a number with no digits (empty number, not 0). You know it's a number, but don't have its value. You know it's a string, but don't have its value. Problem (and source of confusion) here is that while number with no digits is certainly a NULL, string with no characters is treated in most languages as a special case of string - an empty string - and not as string with no value. Most people easily accept ternary logic for numbers and dates and just about any other data type, but they always try to apply binary logic to strings even though they are working in a ternary logic environment and advocate that since it is so in other languages/environments, it should also be so in this environment just because they get used to the way it is elsewhere. It's like dropping on Mars without a life support system and demanding that air be as dense as on Earth because you used to be able to breathe without any lss...

-- 
Vladimir Zakharychev (bob@dpsp-yes.com)                http://www.dpsp-yes.com
Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications.
All opinions are mine and do not necessarily go in line with those of my employer.


"Wolfram Roesler" <wr_at_grp.de> wrote in message news:Xns9272606BF7D48wrgrpde_at_62.153.159.134...

> ctcgag_at_hotmail.com wrote in news:20020821133838.353$Ug_at_newsreader.com:
>
> > I have a great idea, lets make numeric zero also be null. It worked
> > for the Romans.
>
> You perfectly got my point. '' is for strings what 0 is for integers.
> Remember how long it took mankind to accept the fact that it's
> useful to have a symbol for "nothing".
>
> Regards
> W. Roesler
Received on Thu Aug 22 2002 - 02:54:28 CDT

Original text of this message

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