Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: separation of church and state?

Re: separation of church and state?

From: David Portas <REMOVE_BEFORE_REPLYING_dportas_at_acm.org>
Date: Sat, 6 Oct 2007 20:11:05 +0100
Message-ID: <feqdnf77HdVPQJranZ2dneKdnZydnZ2d@giganews.com>


"David Cressey" <cressey73_at_verizon.net> wrote in message news:X4PNi.3890$9r2.3214_at_trndny04...
>
> Oracle RDBMS, by contrast, has always forbidden ORDER BY in view
> definitions. Other than satisfying some people's need for doctrinaire
> purity, the RDBMS users gained nothing by this restriction.
>
>

I disagree. Even in SQL, allowing ORDER BY in a view creates some tough problems.

What would it actually mean for a view to be ordered? Presumably it would mean that at least some queries against that view should exhibit some pre-determined ordering. Now please define exactly which such queries against a view may and may not be ordered in that way (queries with joins, projections, aggregations, etc), including those with joins to other views which also have orderings of their own.

Assuming you can define such a set of rules, how is the product supposed to behave when the user breaks the rules by issuing a query that cannot properly be ordered according to the view definition? Do we disallow such queries and raise an error or do we silently return a result set that isn't sorted? In the latter case, the user must be expected to understand when the rules are being broken and presumably must also know in advance what the ordering is supposed be. What benefit can the user possibly gain from this added complexity?

-- 
David Portas
Received on Sat Oct 06 2007 - 14:11:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US