Re: Bidirectional Binary Self-Joins

From: paul c <toledobythesea_at_oohay.ac>
Date: Fri, 30 Mar 2007 21:18:33 GMT
Message-ID: <J8fPh.1006$aG1.226_at_pd7urf3no>


Bob Badour wrote:
> David Cressey wrote:
>

>> "JOG" <jog_at_cs.nott.ac.uk> wrote in message
>> news:1175268237.587602.313730_at_r56g2000hsd.googlegroups.com...
>>
>>> On Mar 30, 3:44 pm, "Marshall" <marshall.spi..._at_gmail.com> wrote:
>>> ...
>> Would the database engine detect that the game was already in the 
>> relation?
>> If so, how would it do that?  I realize my question is a physical one, 
>> not a
>> logical one,  but I'm asking anyway.

>
>
> 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) }}

I say that would be a different "game", given this schema. But this schema doesn't talk about games, just dates, teams and scores. If the schema were wrong it would be disturbing, but I wouldn't think so if the schema were right. Isn't there a difference between stating who has played who and stating things about games? (ie. one statement is about teams and the other about games.)

Also, even with this schema, surely if two teams can play only one game per day (even though they often play more than one on tournament days) then there should be a constraint that says so.

p Received on Fri Mar 30 2007 - 23:18:33 CEST

Original text of this message