Subject Re: [IBDI] Re: Firebird 1
Author Ann W. Harrison
At 03:01 PM 6/5/2001 -0400, Ed Malloy wrote:

>AND, I am totally lost on this idea of ROWNUM. How can we have ROWNUM
>in a relational database? We are not guaranteed any ordering of the raw
>data. Am I missing something.....

I think ROWNUM is somewhat like an old QLI thing called 'running count';
to produce a numbered list, you'd say something like

QLI> print running count | '. ' | rdb$relation_name of
CON> first 5 rdb$relations sorted by descending rdb$relation_id
3. AWH2
4. AWH1
5. FOO

QLI> print running count | '. ' | rdb$relation_name of
CON> first 5 rdb$relations sorted by ascending rdb$relation_name
1. AWH1
2. AWH2
5. FOO

there's no fixed relationship between a value of running count and a
value of rdb$relation_name. Although first is a blr construct, running
count was implemented in QLI, not the engine. There is a blr value
called blr_run_count ... but no code, so no joy there.

>However, I don't see any problem... Wouldn't we just read All of the
>data into a data structure in memory and assign row numbers to this
>stucture and supply the data sets to the various pages from here. Is it
>critical that these data are not "live?" Couldn't that be solved by
>alowing the user to update the data at any time? what's the problem.

The problem is that users often ask for a huge stack of data, look at
the first 10 items, pick one, and go off happy, leaving the data structure
in memory full of unwanted stuff. Since there's no real way to know that
the user has disappeared in a Web app, there's no good algorithm for
releasing the data.

>On the other issues of an ISP database. They seem valid, except maybe I
>am missing something also. Why would I want an ISP to run the database,
>instead of myself. Why would I want to "share" a database engine??
>Indeed, do I have to have the database on the same computer? I don't.

Ah. You probably wouldn't. But if you were building a general purpose
sort of web app that got relatively unsophisticated organizations on
the internet (i.e. a pizza shop take-out app) you'd find that your average
unsophisticated organization doesn't know a server from salami and wants
to have someone else tend his computer.


We have answers.