Re: constraints in algebra instead of calculus

From: Jan Hidders <hidders_at_gmail.com>
Date: Thu, 14 Jun 2007 22:59:38 -0700
Message-ID: <1181887178.276542.211700_at_o61g2000hsh.googlegroups.com>


On 15 jun, 04:46, paul c <toledobythe..._at_oohay.ac> wrote:
> paul c wrote:
> > paul c wrote:
>
> >> ...
>
> >> 3) Use TTM-style GROUP/UNGROUP to test that
> >> UNGROUP {NK}
> >> (GROUP ( (A GROUP {NK} as NK ))
> >> = A
> >> ...
>
> > Oops, that last one was completely nuts, can't remember now whatever I
> > was thinking. Sorry for wasting people's time.
>
> > p
>
> Marshall, this mis-step has bugged me for days, for no reason that I can
> explain, except that at one time it all seemed crystal-clear and I'm not
> sure now whether my memory is bad or whether I was flat-out wrong to
> think of GROUP et cetera in this way. This might be what I was trying
> to remember:
>
> (Assuming D&D's Tutorial D syntax which I've probably mangled but hoping
> you get the drift. I've tried to write it slow-motion with a bunch of
> relvars and assignments, because I don't think I could avoid those
> without error, even when wide-awake and sober.)
>
> R is relvar name, A is candidate key, B is set of all the non-key
> attributes.
>
> 1. R1 := R GROUP ( {A} as gA )
> 2. R2 := R1 GROUP ( {B} as gB)
> 3. R3 := R GROUP ( {B} as gB )
> 4. R4 := R3 GROUP ( {A} as gA )
> 5. R5 := R4{gB} <AND> R2
> 6. R6 := UNGROUP ( R5 UNGROUP (gB)) (gA) )
> 7. (constraint) R6 = R

You can simplify that a bit:

R1 := (R{B}) GROUP {B} AS gB
R2 := (R GROUP {B} AS gB){gB}
constraint: R1=R2

  • Jan Hidders
Received on Fri Jun 15 2007 - 07:59:38 CEST

Original text of this message