Re: Bidirectional Binary Self-Joins

From: Marshall <marshall.spight_at_gmail.com>
Date: 30 Mar 2007 09:56:05 -0700
Message-ID: <1175273765.245349.17340_at_o5g2000hsb.googlegroups.com>


On Mar 30, 8:23 am, "JOG" <j..._at_cs.nott.ac.uk> wrote:
> On Mar 30, 3:44 pm, "Marshall" <marshall.spi..._at_gmail.com> wrote:
>
> > Idle thought: if you had RVAs, you could do something like:
>
> > { date=12-Dec, teamscores={(team=Hope, score=59), (team=Calvin,
> > score=32)}}
>
> > Marshall
>
> I hate the idea of having to invent a surrogate key to identify a
> game, just so that we can model it in RM (especially given it is
> perfectly identifiable from the date and teams).

The key of course depends on the requirements, which we're just making up as we go along. I would expect there would need to be a game id even without the RM, because otherwise how can we talk about it? Suppose two teams play each other twice in the same day? "Hey, did you see that game where Hope played Calvin? Awesome." "You mean game ten?" "No, the morning game, game nine."

> Hence using RVA's
> certainly seems preferable. But then we've added seemingly unnecessary
> complexity to our queries compared to:
> { (date:12-dec, team: Hope, team:Calvin) }
> { (date:12-dec, team: Hope, score 59), (date:12-dec, team: Hope, score
> 32) }
> Someone fix my thinking. quick.

Which queries?

Perhaps the part of your thinking that needs fixing is the part where you see this as a problem?

Another idle thought. Given my earlier proposal:

> > { date=12-Dec, teamscores={(team=Hope, score=59),
> > (team=Calvin, score=32)}}

You were saying we could uniquely determine a game by the date and the two teams. Okay, why can't we just do that in the above? The primary key would be the pair (date, projection of teamscores over team)

I really wish we'd talk about nested relations more; I want to investigate these sorts of questions.

Marshall Received on Fri Mar 30 2007 - 18:56:05 CEST

Original text of this message