Subject RE: [IBDI] Firebird 1
Author Paulo Gaspar
Answer inline:

> -----Original Message-----
> From: Ed Malloy [mailto:edm@...]
> Sent: Friday, June 01, 2001 3:30 PM
>
> Peter,
>
> What am I missing?
>
> How do we know that the records are stored in a certain order?? AFAIK,
> there is no guaranty in SQL that records are stored in any particular
> order; indeed the way I learned, we should NOT trust anything like row
> order.

"ORDER BY" can be part of the picture.

> If I want to access records in the order that they were entered, I just
> access them via the Primary key -- which, on my tables is practically
> always a synthetic variable designed to be nothing but a primary key and
> that is numbered sequentially.

The order to present the records can change from one page to the other.
As it can change in any other application.

> If I wanted .. 20 rows from ... somewhere. Once I establish where
> somewhere is, I can ask for .... BETWEEN :thiskey and :nextkey (where
> nextkey = thiskey + 19)

For most cases there is no simple way to saying what is the "thiskey" and
the "nextkey". There are requests that can be translated by things like:
Page 3 with 20 records by page of all the movie sessions running this
week in my region (e.g.: 50 km around this city), ordered by movie name,
city, cinema, room, session date/time.

Nice huh?

And the listing can have a completely different sort order and filtering
all the time.

It is not simple.


> ed
>
> .......

Have fun,
Paulo Gaspar