![]() | |
#11
| |||
| |||
|
|
Mark Johnson wrote: No that's a relation. In describing a race, the attributes might include, gate. The gates are ordered. But as I understand it, relations are not supposed to be sorted. So I wondered that if a relation includes a horse's ranking, as a 'thing' intrinsic, that one is trying to say that relations can be sorted? In a database that is not set oriented, you could simply add horses to a race, the gate number would be implicit through the insertion order. |
#12
| |||
| |||
|
|
"Mark Johnson" <102334.12 (AT) compuserve (DOT) com> wrote in message What do you mean by "how far does one carry that"? All your examples are typical of cursors, not relations. Every time you say "list", think "cursor". Cursors are always sorted, but relations are not. No that's a relation. In describing a race, the attributes might include, gate. The gates are ordered. The gates aren't really ordered. The locations of the gates are ordered, and the numbers painted on the gates are ordered, but the gates themselves are not ordered. Or, to be more precise, one could define a variety of orders over the gates, |
#13
| |||
| |||
|
|
No that's a relation. In describing a race, the attributes might include, gate. The gates are ordered. The gates aren't really ordered. The locations of the gates are ordered, and the numbers painted on the gates are ordered, but the gates themselves are not ordered. |
#14
| |||
| |||
|
|
"David Cressey" <dcressey (AT) verizon (DOT) net> wrote in message news:ifFKf.9191$qa2.4665 (AT) trndny07 (DOT) .. No that's a relation. In describing a race, the attributes might include, gate. The gates are ordered. The gates aren't really ordered. The locations of the gates are ordered, and the numbers painted on the gates are ordered, but the gates themselves are not ordered. How would you model the beads and rods from http://mathworld.wolfram.com/Bead-Sort.html with RM instead ? :-) A model is something static. |
#15
| |||
| |||
|
|
But as I understand it, relations are not supposed to be sorted. |
|
So I wondered that if a relation includes a horse's ranking, as a 'thing' intrinsic, that one is trying to say that relations can be sorted? |
#16
| |||
| |||
|
|
Cursors are always sorted, but relations are not. |
#17
| |||
| |||
|
|
Mark Johnson wrote: But as I understand it, relations are not supposed to be sorted. Relations have no implicit order. This is part of the definition. |
|
So I wondered that if a relation includes a horse's ranking, as a 'thing' intrinsic, that one is trying to say that relations can be sorted? It depends on what you mean by "sorted." If you mean, can we change the definition of relation to include the idea that it has implicit order, then the answer is "no." If you mean, can we pass the relation to a sort function that will examine the attributes of the relation and return an ***ordered set*** that has the same elements as the original set, then the answer is "yes." Reviewing the fundamentals of set theory might be in order; this is a very basic question. |
#18
| |||
| |||
|
|
Mark Johnson wrote: No that's a relation. In describing a race, the attributes might include, gate. The gates are ordered. But as I understand it, relations are not supposed to be sorted. So I wondered that if a relation includes a horse's ranking, as a 'thing' intrinsic, that one is trying to say that relations can be sorted? In a database that is not set oriented, you could simply add horses to a race, the gate number would be implicit through the insertion order. |
|
In a set oriented model, any sort order must be explicitly defined through additional attributes, in this case the gate number. The database itself does not know that this attribute has to do anything with ordering (1). To get the values in the order defined through that attribute, you have to add an ORDER BY clause, which is a feature of the cursor, not of an relation. |
#19
| |||
| |||
|
|
On Tue, 21 Feb 2006 10:56:13 +0100, Bob Hairgrove invalid (AT) bigfoot (DOT) com> wrote: Relations are not sorted at all. |
#20
| |||
| |||
|
|
Given the right attributes you can sort according to all those orders in your database. |
![]() |
| Thread Tools | |
| Display Modes | |
| |