Re: Proposal: 6NF

From: Sampo Syreeni <decoy_at_iki.fi>
Date: Fri, 6 Oct 2006 00:21:17 +0300
Message-ID: <Pine.SOL.4.62.0610052352190.18113_at_kruuna.helsinki.fi>


On 2006-10-05, Bob Badour wrote:

> So, you are saying that laying zero eggs includes the inapplicability
> of the whole concept of laying anything. If zero suffices, why NULL?

Because a bird that has laid zero eggs might then be observed to lay more, and we would want to assign a nonzero value to its eggs_laid. With camels it's different.

>> Furthermore, at the time your code is expected to be finalized, you
>> only know that there will be animals, some of which lay eggs, but you
>> don't know which kinds of properties all of the animals eventually
>> described in the database might have.
>
> Ah, but one will have to know what those are before one commits the schema
> and one will have to know the properties of interest before one writes a
> query.

The whole point of my exercise was that judicious use of nulls allows you to escape the first half, at least in this one case. In my opinion such separation of concerns is a worthy design goal, because schemas tend not to be entirely static and added dependent attributes are perhaps the most common form of real life schema evolution.

-- 
Sampo Syreeni, aka decoy - mailto:decoy_at_iki.fi, tel:+358-50-5756111
student/math+cs/helsinki university, http://www.iki.fi/~decoy/front
openpgp: 050985C2/025E D175 ABE5 027C 9494 EEB0 E090 8BA9 0509 85C2
Received on Thu Oct 05 2006 - 23:21:17 CEST

Original text of this message