Re: Bidirectional Binary Self-Joins
Date: 31 Mar 2007 07:37:06 -0700
Message-ID: <1175351826.394824.104160_at_o5g2000hsb.googlegroups.com>
On Mar 31, 2:08 am, mAsterdam <mAster..._at_vrijdag.org> wrote:
> Marshall wrote:
> > Bob Badour wrote:
> >> It would use the equality operation to detect the duplicate. What's more
> >> disturbing is it would allow the following without complaint:
>
> >> { date=12-Dec, teamscores={(team=Calvin, score=31), (team=Hope, score=59) }}
>
> > Whether it complained or not would depend on the keys and other
> > constraints.
> > In another subthread I proposed the following key:
>
> > (date, π_team(teamscores))
>
> ... allowing (using Bob's tag-notation):
>
> { date=12-Dec, teamscores={(team=Calvin, score=31),
> (team=Hope, score=59),
> (team=Glory, score=71)
> }
>
> }
D'oh!
I believe it was earlier stated that each team could play only once per day, thus both (12-Dec, Hope) and (12-Dec, Calvin) must be unique. This is sufficiently annoying with RVAs that I am now inclined to go back to the non-RVA model.
(date, team1, team1score, team2, team2score)
unique(date, team1)
unique(date, team2)
check(team1 < team2)
The third constraint's "<" can be any order relation, and canonicalizes the tuple type.
Any my new response to anyone who doesn't like the above will be "get over it." :-)
Marshall Received on Sat Mar 31 2007 - 16:37:06 CEST