Re: Is relational theory irrelevant? (was Re: Dreaming About Redesigning SQL)

From: Lauri Pietarinen <lauri.pietarinen_at_atbusiness.com>
Date: Tue, 11 Nov 2003 22:50:19 +0200
Message-ID: <bori5r$aag$1_at_nyytiset.pp.htv.fi>


Marshall Spight wrote:

>"Bob Badour" <bbadour_at_golden.net> wrote in message news:sZqdnURpMcikvzKi4p2dnA@golden.net...
>
>
>>>>Express a quota query.
>>>>
>>>>
>>>select top 5 * from (
>>> select * from emp order by sal
>>>)
>>>
>>>What is the problem, besides "5*from" looking ugly?
>>>
>>>
>>The ordered operand.
>>
>>
>
>I'm sorry, but I'm totally at a loss as to why that's a problem.
>Any references for further info?
>
>In fact, here's a larger question: it seems to me that neither
>SQL nor TTM make adequate provisions for the difference
>between well-ordered relations and partially-ordered relations.
>
I think TTM is quite clear about it. Tuples have no order in relations. The quota query
(top 10 etc.) does not order the resulting relation in any way, it just includes the
first n tuples according to some criterion (it actually might contain more, if there is a tie).

Now, the fact that in reports and screens we want our information ordered by some
criterion has nothing to do with the RM, because as soon as the tuples are ordered
they are not relations any more, but merely a vector of rows that can be consumed by
a program and shown on a screen. But that is not really a problem, is it?

An example of a TTM-style quota query can be found here:

http://groups.google.com/groups?q=pietarinen+hammer+group:comp.databases.theory&hl=en&lr=&ie=UTF-8&group=comp.databases.theory&selm=e9d83568.0210301138.2e5099e6%40posting.google.com&rnum=1

best regards,
Lauri Pietarinen Received on Tue Nov 11 2003 - 21:50:19 CET

Original text of this message