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

Home -> Community -> Usenet -> comp.databases.theory -> Re: So what's null then if it's not nothing?

Re: So what's null then if it's not nothing?

From: FrankHamersley <FrankHamersleyZat_at_hotmail.com>
Date: Thu, 24 Nov 2005 12:15:26 GMT
Message-ID: <y9ihf.2804$ea6.1120@news-server.bigpond.net.au>


Hugo Kornelis wrote:
> On Wed, 23 Nov 2005 01:09:56 GMT, Frank Hamersley wrote:

>>Hugo Kornelis wrote:
>>[..]
>>Is "<Person><Name>Hugo Kornelis</Name></Person>" the same as
>>"<Person><Name>Hugo Kornelis</Name><Birthday></Birthday></Person>"?

>
> Hi Frank,
>
> I don't think so. I the first XML string, there is no Birthday attribute
> for me. It's missing. In SQL, this would be represented by NULL in the
> table, or my omitting the row if the birthday were stored in a seperate
> table. In Pick, this would (as I understand it) be stored by omitting
> the cell for Birthday.
>
> The second XML string lists a blank birthday for me. That can't be
> stored in SQL, as it's strong typing prevents a date from being blank.
> The Pick data model appears to accept this (unless the DB engine checks
> before inserting the data), as does XML.
>
> Best, Hugo

G'day Hugo, the thought occurred to me how would the SQL/DBMS products which all offer increasing XML integration react to an import of

    <Person><Name>Hugo Kornelis</Name><Birthday></Birthday></Person>

immediately followed by export of the resultant object. Do they produce

  1. <Person><Name>Hugo Kornelis</Name><Birthday></Birthday></Person>
  2. <Person><Name>Hugo Kornelis</Name></Person>
  3. <Person><Name>Hugo Kornelis</Name><Birthday>NULL</Birthday></Person>

If I get time in the future I will have a fiddle with Sybase ASE XML to see what it does. I suspect (a) is the likely answer.

Cheers, Frank. Received on Thu Nov 24 2005 - 06:15:26 CST

Original text of this message

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