Re: 3vl 2vl and NULL
Date: 5 Dec 2005 18:17:49 -0800
Message-ID: <1133835469.329650.234930_at_g14g2000cwa.googlegroups.com>
Hugo Kornelis wrote:
> On 4 Dec 2005 17:57:01 -0800, michael_at_preece.net wrote:
What type of liquid is stored in an empty mug? Is it "unknown"? No - it
is not an unknown type of liquid. It is no liquid. The value of the
"liquid" column for the row would be empty. It would be NULL.
Super,
>
> (snip)
> >OK. There is one fundamental problem with this. Some of those NULLs in
> >those tuples might represent that we know something is empty - so it
> >has to be treated as a known value. All NULLs are not created equal.
>
> <sigh>
>
> Hi Mike,
>
> No. If something is known to be empty, it's not stored as NULL. At least
> not in SQL databases (which this thread is about, IIRC).
>
> If a comment is empty, iut's stored as the empty string (''). If a
> container is empty, it's contents is stored as zero gallons (0). Dates
> can't be empty. (Days can be, though - that's stored as an absence of
> rows in the Events table).
>
> Best, Hugo