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

From: Bob Badour <bbadour_at_golden.net>
Date: Tue, 11 Nov 2003 11:41:29 -0500
Message-ID: <xaadncLRvLrBjCyiRVn-gw_at_golden.net>


"Marshall Spight" <mspight_at_dnai.com> wrote in message news:_%7sb.173236$Fm2.151658_at_attbi_s04... > "Bob Badour" <bbadour_at_golden.net> wrote in message news:sZqdnURpMcikvzKi4p2dnA_at_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?

Relations have no order. The ordered operand implies some conversion to a different type that is ordered, which then changes the logical model from a "relational model" to a "relational and something else model".

> 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.

Relations have no order. What provisions for order would either provide for an unordered structure?

> It seems to me the two cases have to be considered separately:
> the partially-ordered relation will be subject to the issues
> (specifically: ties) discussed in Practical Issues in Database
> Management (bing!: could that be what you're talking about,
> above?) but the well-ordered relation is not. And I think
> we'd want to preserve the distinction.
>
> For example, we know if we sort using a total ordering function
> on a key column that we will have no ties.

Sorting is physical when dealing with an unordered logical structure and may not even be required. Received on Tue Nov 11 2003 - 17:41:29 CET

Original text of this message