Re: Bidirectional Binary Self-Joins

From: Marshall <marshall.spight_at_gmail.com>
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.

Queries like "what games did Hope play in" and "what teams scored over 40 points" go back to being trivial.

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

Original text of this message