Re: Lucid statement of the MV vs RM position?

From: J M Davitt <jdavitt_at_aeneas.net>
Date: Fri, 05 May 2006 03:39:36 GMT
Message-ID: <YNz6g.20518$YI5.13034_at_tornado.ohiordc.rr.com>


JOG wrote:

> Jon Heggland wrote:
> 

>>GUNF intuitively seems very simple to me; like most NFs, it's just
>>formalised common sense. Consider an example of the relvar keys relvar (1):
>>
>>Relvar|Key
>>======+========
>>R1 { A }
>>R2 { B }
>>R1 { C, D }
>>
>>---i.e. relvar R1 has two keys, { A } and { C, D }, while R2 has but
>>one, { B }. Ungrouping (unnesting) it produces the following relation (2):
>>
>>Relvar|Key component
>>======+=============
>>R1 A
>>R2 B
>>R1 C
>>R1 D
>>
>>---and grouping it again produces this (3):
>>
>>Relvar|Key (wrong)
>>======+-----------
>>R1 { A, C, D }
>>R2 { B }
>>
>>(3) is different from (1), hence (1) is in GUNF, and the use of an RVA
>>is justified. (Actually, Darwen's GUNF formulation is slightly
>>different, but I believe my example captures its intent. The point is (I
>>think) that there does not exist any relation of type (2) that when
>>grouped produces (1).)
> 
> 
> These are great examples Jon. GUNF is perhaps a missing piece in my
> theoretical understanding as it seems to state formally what I have
> been struggling with intuitively for months, when I've commented that
> "sets shouldn't just pop into existence from nowhere". I have been
> struggling with an example for a while:
> 
> A fish can be gold.
> A cow can be brown.
> A cow can be black and white.
> 
> Animal |  Colour
> -----------------
> Fish     { Gold }
> Cow     { Brown }
> Cow     { Black, White }
> 
> With the PK { Animal, Colour }. If I Ungroup I will generate:
> 
> Animal |  Colour
> -----------------
> Fish    Gold
> Cow    Brown
> Cow    Black
> Cow    White
> 
> But this is now not in GUNF because if I regroup I'll get:
> 
> Animal |  Colour
> -----------------
> Fish     { Gold }
> Cow     { Brown, Black, White }
> 
> Which is of course nonsense in reference to my original predicate. Now
> if my understanding is correct, to model this albeit very rough
> information, I can now formally show that I will require an RVA. (I
> could use a surrogate but I would rather not materialize artificial new
> data just to accomodate what I have.)
> 
> Someone affirm this to me or shoot my naivite down in flames.
> 

I think that an all-key
  relation { animal string, colour relation { colour string } } is very different from
  relation { animal string, colour string }

This, of course, maybe exactly why D+D suggest that base relations consisting of other than scalar types are of limited usefulness.

With TutD, I have GROUPed and UNGROUPed a handful of such things, but a key component was never part of the mix. I think you've both uncovered examples which may provide useful insight; thanks.

I'm going to ponder a bit...

> 
> 

>>In contrast, the Barney/Oscar relvar (1):
>>
>>Name |Colours
>>======+-------
>>Barney { green, purple }
>>Oscar { green, black }
>>
>>is *not* in GUNF, because there exists a relation (2)
>>
>>Name |Colour
>>======+======
>>Barney green
>>Barney purple
>>Oscar green
>>Oscar black
>>
>>that when grouped produces (1). Switching names and colours does not
>>help, of course.
>>
>>Your supplier/parts example is probably equivalent to one of the above;
>>I'm not sure which, since you don't give all the necessary details (viz.
>>keys/FDs).
>>--
>>Jon
>
> Received on Fri May 05 2006 - 05:39:36 CEST

Original text of this message