![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
It seems a little doctrinaire to me. I can agree that the "result isn't a relation" but on the other hand a user could see such a result without knowing that "ORDER BY" was involved and not be faulted for taking it to be a relation. |
#2
| |||
| |||
|
|
"paul c" <toledobythesea (AT) ooyah (DOT) ac> wrote in message news:hoONi.6504$_K.2827 (AT) pd7urf3no (DOT) .. It seems a little doctrinaire to me. I can agree that the "result isn't a relation" but on the other hand a user could see such a result without knowing that "ORDER BY" was involved and not be faulted for taking it to be a relation. What user ever would? Users never see relations. They see various kinds of reports (using the word "report" to mean anything users get to see). |
#3
| |||
| |||
|
|
David Cressey wrote: "paul c" ... It is a little doctrinaire. Oracle/Rdb (originially DEC Rdb/VMS) has always allowed ORDER BY in a view definition. No damage was done to the ability of the user to apply concepts of relational algebra to the task of getting useful work done. One could reference such a view inside another view, or in any other context where an unordered table would have been expected, and the results were logically equivalent to the result one would have obtained in the absence of the ORDER BY. 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 think you're extrapolating Date's remarks to a point that he might not agree with. A table with an index is still a table. BTW, the doctrinaire folks among us will insist that SQL does not have INDEX in the standard. But we all know that SQL databases use indexes to speed up queries. And many application programmers appreciate being told what indexes are present so that they can organize their queries for performance. The doctrinaire people will say that the programmers have no need to know index information, because it's not part of the logical model. In theory they are right. In practice, it helps to provide them with it. I'm not sure it's a stretch. I feel fairly confident about resorting to the Information Principle when asking if a result is correct according to an algebra. Admittedly, I lump aspects such as ordering and indexing as 'not applicable' when trying to apply the IP. If I may be allowed to discount those aspects for results, I don't see why I can't discount, ie., ignore them, for intermediate results. |
#4
| |||
| |||
|
|
David Cressey wrote: ... I think you're extrapolating Date's remarks to a point that he might not agree with. A table with an index is still a table. ... I *suppose* it is but only in the interest of getting along with the rest of the world, most of whom I think would agree with you. It's just that I've never seen a formal definition of a table as a mathematical object, only as a graphical analogy to a relation, without respect to an algebra. |
|
Therefore, I don't understand how dbms's manipulate tables in a relational way. It seems to me that they must need to manipulate relations or relation variables instead. |
#5
| |||
| |||
|
|
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. |
#6
| |||
| |||
|
|
"David Cressey" <cressey73 (AT) verizon (DOT) net> wrote in message news:X4PNi.3890$9r2.3214 (AT) trndny04 (DOT) .. 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 |
#7
| |||
| |||
|
|
"paul c" <toledobythe... (AT) ooyah (DOT) ac> wrote in message news:hoONi.6504$_K.2827 (AT) pd7urf3no (DOT) .. It seems a little doctrinaire to me. I can agree that the "result isn't a relation" but on the other hand a user could see such a result without knowing that "ORDER BY" was involved and not be faulted for taking it to be a relation. What user ever would? Users never see relations. They see various kinds of reports (using the word "report" to mean anything users get to see). |
#8
| |||
| |||
|
|
Roy Hann wrote: "paul c" <toledobythe... (AT) ooyah (DOT) ac> wrote in message news:hoONi.6504$_K.2827 (AT) pd7urf3no (DOT) .. It seems a little doctrinaire to me. I can agree that the "result isn't a relation" but on the other hand a user could see such a result without knowing that "ORDER BY" was involved and not be faulted for taking it to be a relation. What user ever would? Users never see relations. They see various kinds of reports (using the word "report" to mean anything users get to see). Roy I can buy that relations aren't visible to the naked eye but I'd say that users certainly do see representations of relations (even if the representations are called tables) and the relations are visible in the mind's eye. Maybe if the word "understand" is substituted for "see" it makes more sense, after all, predicates aren't physically visible either but users do need to understand them. The way I look at it is that Date tries to remind us of the |
#9
| |||
| |||
|
|
On Oct 6, 9:48 am, "Roy Hann" <specia... (AT) processed (DOT) almost.meat> wrote: "paul c" <toledobythe... (AT) ooyah (DOT) ac> wrote in message news:hoONi.6504$_K.2827 (AT) pd7urf3no (DOT) .. It seems a little doctrinaire to me. I can agree that the "result isn't a relation" but on the other hand a user could see such a result without knowing that "ORDER BY" was involved and not be faulted for taking it to be a relation. What user ever would? Users never see relations. They see various kinds of reports (using the word "report" to mean anything users get to see). |
|
All that goofy stuff I wrote above can be argued for, but why? |
#10
| |||
| |||
|
|
Could be. Maybe one of Date's meanings is that no system that supports both ordering and some relational algebra is purely relational, even if the "pure" relational part of it could be isolated in some way from the rest! If so, calling the paragraph "doctrinaire" might be a bit of a slur. |
![]() |
| Thread Tools | |
| Display Modes | |
| |