Path: news.netfront.net!ctu-peer!news.nctu.edu.tw!newshub.sdsu.edu!postnews.google.com!a35g2000prf.googlegroups.com!not-for-mail
From: Marshall <marshall.spight@gmail.com>
Newsgroups: comp.databases.theory
Subject: Re: NULLs
Date: Sat, 29 Dec 2007 10:34:06 -0800 (PST)
Organization: http://groups.google.com
Lines: 69
Message-ID: <6cb1efcb-9dcb-45f2-9d36-62ec4d8355ed@a35g2000prf.googlegroups.com>
References: <4afba236-4273-4d24-b8f4-5041483d22fc@i12g2000prf.googlegroups.com> 
 <Jswcj.4730$Pt6.4162@trndny07> <11f49d61-e9d9-4198-b588-5360fafa83f1@1g2000hsl.googlegroups.com> 
 <47731962$0$5286$9a566e8b@news.aliant.net> <07d8n354ojlanoi4t2reedhvmmpq8pfe90@4ax.com> 
 <56f8a858-599d-4247-826c-32721b372c65@n20g2000hsh.googlegroups.com> 
 <g2van3h12ilt0m8s0q1hv47sceei7e386r@4ax.com>
NNTP-Posting-Host: 24.7.53.249
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1198953247 10526 127.0.0.1 (29 Dec 2007 18:34:07 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 29 Dec 2007 18:34:07 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a35g2000prf.googlegroups.com; posting-host=24.7.53.249; 
 posting-account=Rqa4sAoAAAC88UYanCtJRUF4S6TUauGA
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) 
 Gecko/20071127 Firefox/2.0.0.11,gzip(gfe),gzip(gfe)
Xref: news.netfront.net comp.databases.theory:46654

On Dec 28, 2:59 pm, Hugo Kornelis
<h...@perFact.REMOVETHIS.info.INVALID> wrote:
>
> 3VL is not a result of using NULL to represent missing information, but
> a result of allowing missing information. IMO, there are only two
> options: either you deal with missing information, and with the 3VL that
> results from it -- or you somehow alter reality so that information is
> never missing again, for any reason.

Full normalization is a third option.


> > There has to be a more elegant way....Regards, J.
>
> I doubt it. Given this information:
>
> * "Employee Jack is male"
> * "Employee Mary is female"
> * "Employee Jack is 43 years old"
> * "Employee JJ is 32 years old"
>
> how would you answer the below questions:
>
> * "List all employees aged 40 and above".
> * "What is the average age of our employees?"
> * "For each employee, how many years left until retirement (assume a
> country with laws for retirement age of 65)"
> * "List all employees that are female, under 35 years old, or both"
> * "Is JJ older than Mary?"
> * etc

Given the schema of the database you have supplied above,
the questions you propose are not askable, in the same way
as if you had proposed the question "which animals are
marsupial?"

Asking which employees are 40 and over *requires* the
predicate (employee, age) be present, either directly or
as a projection or join or whatever. Since it isn't, you can't
*ask* the question. Note that I didn't say "answer" the
question--you can't even *ask* the question. It's not well
formed.

(You could of course ask the question "for those employees
for whom we know their age, which are 40 and over?")


> [...]
>
> I can give answers to all questions above, but I have to use 3VL in all
> cases.

Not exactly. You can give answers to questions that are similar
to the ones asked above, but modified in the way I mention
parenthetically.


> For me, that signifies that 3VL is part of reality and hence
> can't be left out of a database that attempts to model (aspects of)
> reality.

I agree that missing information is often a fact of life,
but I don't agree that NULL or 3VL necessarily follows.
There are other options, and furthermore, I think our
experience with SQL shows that the other options are
better ones.


Marshall
