Two DB questions

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Oct 24 03:39:56 EDT 2008


On 10/24/08 10:29 AM, "Klaus Major" <klaus at major-k.de> wrote:

>> It seems that you come from an "old fashioned" DB background (i.e.,
>> dBaseII, etc) where the idea of a record number meant something.

I will argue to Len.

1) Klaus did asked about random POSITION of cursor.
2) about how to find it again after second query.

You mention that record number is old fashion.
But ok, "modern" fashion of the **old RDBMS model** have Primary Key.

We always can consider unique value of PK as "record number".


> Actually I come form nowhere (database wise) :-D
> 
> And I really do not care about record numbers, I only want to display
> something like
> "Record x of Y" on the card while he is browsing through the data,
> since this the info
> that I would like to see, too.
> 
> And I want to "sync" this display after a new cursor has been fetched.
> Know what I mean?
> 
>> If you read up on the history of SQL, you'll see that one of reasons
>> for SQL was to get rid of the concept of a record number.  In fact
>> when you join two or more tables, what would the "record number"
>> represent since the "table" that you are returning doesn't actually
>> exist in the database (it's created on the fly).

JOIN of two tables still can have ID1, ID2 to provide unique identification
of

a) record in join

b) parts of this join-record, so I can always find them in original two
tables.


>> However, there IS a way that Revolution is particularly good at:
>> Return your records as a list (as opposed to a record set) and then
>> go to the line number (which becomes the record number) and use
>> "items" to get at the various fields.  As long as your returned data
>> isn't too large, it should be very fast.
> 
> Since I do not know how large the possible data is, I tend to create
> generic handlers.
> That's why I prefer cursors instead of the "real" data.

Besides this not solve task of SECOND search in the new cursor.

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]





More information about the use-livecode mailing list