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

Home -> Community -> Usenet -> c.d.o.misc -> Re: NULL versus empty string

Re: NULL versus empty string

From: Robert A.M. van Lopik <lopik_at_mail.telepac.pt>
Date: Mon, 30 Sep 2002 13:08:54 +0100
Message-ID: <1033391153.436137@spynews6.telepac.pt>

"Michael Gast" <mig-sm_at_web.de> wrote in message news:3D981997.20600_at_web.de...
> Hi Tim,
>
> Tim schrieb:
> > I would guess that the logic is that if you don't want to allow null,
> > then you want an actual value and "" while not being null, is not really
> > a value conceptually. I mean, if "" was acceptable, why not just allow
> > null?
>
> NULL means: I have no value
> "" means: I have the value ""

The problem becomes acute, when you are importing from XML. There is a significant difference between an XML element being optional and a mandatory element containing #PCDATA which could be an empty string. In this case it really is very unfortunate that Oracle treats empty strings as NULL, because that way one can not accomplish a mapping between XML and the relational model in a simple way.

rob van lopik Received on Mon Sep 30 2002 - 07:08:54 CDT

Original text of this message

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