Re: 3 value logic. Why is SQL so special?
Date: 16 Sep 2006 10:03:42 -0700
Message-ID: <1158426221.948430.297820_at_k70g2000cwa.googlegroups.com>
Chris Lim wrote:
> Cimode wrote:
> > And many other information...
> > This is a purely pedagogical case (far from being complete) to
> > demonstrate that it is perfectly possible to build some logical design
> > in minutes (took me 20 of them) WITHOUT using NULLS...while sticking to
> > the God Damn Real World (lazyness) excuse...
>
> In a database without NULLs, would you have to do LEFT OUTER JOINs in
> all queries where you want all rows from your 'main' table returned,
> regardless of whether they have the optional attributes or not? Say,
> for example, all flights, with or without an actual departure time. And
> if so, how do the 'missing' attributes get returned from these queries,
> if NULLs are not allowed?
I know what you are getting at. But you are using the wrong example
and asking the wrong question. The impact of using NULL values have
nothing to do with presentation issues. You don't design data schemas
according to the way data should look on user's screen but according to
rules that allow to preserve integrity(for instance NULLS will make
your count results false if you do not add a filtering condition to
exclude NULLS from ALL your queries!). Keep in imnd that NULLS is just
SQL's way (a poor way) of dealing with missing data. For explanations
on how to deal with missing data while preserving a normalized schema,
you may want to take a look at McGoveran paper on the thirdmanifesto
website...
> Chris
Received on Sat Sep 16 2006 - 19:03:42 CEST