Re: more closed-world chatter

From: Marshall <marshall.spight_at_gmail.com>
Date: 7 May 2007 11:27:54 -0700
Message-ID: <1178562474.183413.205420_at_n59g2000hsh.googlegroups.com>


On May 7, 4:15 am, Jon Heggland <jon.heggl..._at_idi.ntnu.no> wrote:

> Marshall wrote:
> > On May 6, 11:21 pm, Jon Heggland <jon.heggl..._at_idi.ntnu.no> wrote:
> >> Are you familiar with TTM's IM prescription 13: Join etc. with
> >> inheritance? Are you able to reconcile your preference with that?
>
> > Is that the one that says the type of an attribute in the result
> > of a join is the most common specific supertype? If so,
> > yes I am familiar, and no, I can't reconcile it. I don't see
> > any reason to prefer a type that's more general than necessary.
>
> The crux of the matter in that prescription is the equivalence between
> R1 & R2 and R1 - (R1 - R2). How do you handle that?

Well, it took me a long time to figure it out, because I hadn't worked out constraint propagation through minus before. However it appears the TTM type system isn't powerful enough to capture sufficient information to handle this equivalence, whereas mine is. The difference is the ability or inability to negate constraints in a minus.

(Below, everything assumes single-attribute relations. The situation with multiple attributes is more complex.)

Rx has attribute a:ellipse
Ry has attribute a:circle

TTM claims (Rx&Ry) has attribute a:ellipse, because Rx \ (Rx \ Ry) has attribute a:ellipse. That derives from the fact that TTM considers the type of Rx \ Ry to be set(a:ellipse).

Let us consider *only* the constraints. I write constraints inside [].

Rx [a:ellipse]
Ry [a:circle]

TTM: Rx \ (Rx \ Ry) has constraints:
[a:ellipse] \ ([a:ellipse] \ [a:circle]) =
[a:ellipse] \ ([a:ellipse]) =
[a:ellipse]

My way:

Rx \ (Rx \ Ry) has constraints:
[a:ellipse] \ ([a:ellipse] \ [a:circle]) =
[a:ellipse] \ ([a:ellipse & !(a:circle))]) =
[a:ellipse & !(a:ellipse & !(a:circle))] =
[a:ellipse & (!(a:ellipse) | ! !(a:circle))] =
[a:ellipse & (!(a:ellipse) | a:circle))] =
[a:ellipse & a:circle] =
[a:circle]

Under my approach, the constraints for
A&B are the same as the constraints
for A \ (A \ B) in the case of A and B
having only a single common attribute;
in both cases it is the conjunction of the constraints of A and the constraints of B. TTM has it the disjunction, which is sound but overbroad.

Marshall Received on Mon May 07 2007 - 20:27:54 CEST

Original text of this message