Re: The Relational Model & Queries That Naturally Return Duplicate Rows

From: Joe Thurbon <usenet_at_thurbon.com>
Date: Sun, 10 Oct 2010 12:56:13 +1000
Message-ID: <op.vkcafzznq7k8pw_at_the-thurbonss-imac.local>


On Sun, 10 Oct 2010 08:36:38 +1000, Erwin <e.smout_at_myonline.be> wrote:

> On 10 okt, 00:14, Cimode <cim..._at_hotmail.com> wrote:
>>
>> Getting an unintuitive point across to somebody who
>> probably never read any significant RM theory material
>
> Hmmmmmmmm. Now I'm just being curious.
>
> How can you match this claim of yours with the fact that the OP
> explicitly states in his question that
>
> "Since this is not a relation - because it contains duplicate rows -
> ".
>
> Do you think there exists any source _BUT_ "significant RM theory
> material" where he could have acquired the knowledge to state that ?
>
> I'm also curious as to why he's asking to be pointed out what I think
> should be obvious, but then again recent discussions on other subjects
> have revealed to me that there is no predicting when people will fail
> to see the obvious, merely because of certain kinds of mental block
> they happen to be suffering from. I'm granting the OP the benefit of
> the doubt that he might be suffering from a mental block of the kind
> "surely if SQL is so widespread, then everything it does must be
> right".

In the context of recent discussion on the ttm mailing list regarding ORDER BY, it's not clear to me that correct answer is indeed obvious. (In fact, given my track record on cdt, I'm not sure that I am thinking of the correct answer).

With that caveat in mind, given that, with the OP's database, the query

SELECT FIRST_NAME from USERS order by FIRST_NAME

presents the user with something that is not a relation, it seems strange to require that

SELECT LAST_NAME from USERS

should. (Apart from that projection is a relational operator, and order by isn't, but that seems to me at least to be slightly subtle).

Cheers,
Joe Received on Sun Oct 10 2010 - 04:56:13 CEST

Original text of this message