Subject | Re: Firebird 1 |
---|---|
Author | ft@cluedup.com |
Post date | 2001-06-05T19:51:11Z |
--- In IBDI@y..., Ed Malloy <edm@B...> wrote:
criteria including screening time between 7pm and midnight, and there
are 100 screenings that fullfill the criteria, including 60 that
begin between 7pm and 10:30. The initial screen will show 20 of the
100 according to the orderby clauses. Suppose the last item on the
first page is an 11 pm screening of the first movie on the list. The
second query will exclude all screening of all the rest of the movies
that begin before 11 pm.
is the index within a result set, not in a table. One of its uses
with Oracle is for selecting subsets of the result set.
to which Ann was responding you will see that for some types of
application you will need an infinite number of arrays with different
sorting orders as indexes to the structure you are proposing, in
other words, the programmer will have to write a mini relational
database.
Others do.
Fred Toussi
> Hi All,sure
>
> I think Ann's example might be a little ragged... in that are we
> that only one showing would meet all the == criteria? But I dontft's
> criticism is correct. Wouldn't Ann's query simply exclude moviesthat
> started before the last displayed entry.Suppose one is looking for a list of screenings which fulfill several
criteria including screening time between 7pm and midnight, and there
are 100 screenings that fullfill the criteria, including 60 that
begin between 7pm and 10:30. The initial screen will show 20 of the
100 according to the orderby clauses. Suppose the last item on the
first page is an 11 pm screening of the first movie on the list. The
second query will exclude all screening of all the rest of the movies
that begin before 11 pm.
> AND, I am totally lost on this idea of ROWNUM. How can we haveROWNUM
> in a relational database? We are not guaranteed any ordering of theraw
> data. Am I missing something.....Yes, please read all the posts in this and a related thread. ROWNUM
is the index within a result set, not in a table. One of its uses
with Oracle is for selecting subsets of the result set.
> However, I don't see any problem... Wouldn't we just read All of theIs it
> 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.
> critical that these data are not "live?" Couldn't that be solved byNo problem at all for some tasks. If you read the messages from Paulo
> alowing the user to update the data at any time? what's the problem.
to which Ann was responding you will see that for some types of
application you will need an infinite number of arrays with different
sorting orders as indexes to the structure you are proposing, in
other words, the programmer will have to write a mini relational
database.
> On the other issues of an ISP database. They seem valid, exceptmaybe I
> am missing something also. Why would I want an ISP to run thedatabase,
> instead of myself. Why would I want to "share" a database engine??don't.
> Indeed, do I have to have the database on the same computer? I
>You may not need or want an ISP to run your database, neither do I.
Others do.
Fred Toussi
> ft@c... wrote:return.
> >
> > Oops!
> >
> > This type of query won't work. Suppose the last movie in the first
> > list is a late night screening, the next query will exclude almost
> > all the movies that the full dataset of the first query would
> >unique
> > In general, in a dataset sorted on multiple keys, you need a
> > key sorted according to the combined aggregate sorting order inorder
> > to be able to select consecutive parts. ROWNUM is such a key withthe
> > added property of being a counter.+ 7
> >
> > Fred Toussi
> >
> > --- In IBDI@y..., "Ann W. Harrison" <aharrison@i...> wrote:
> > > At 04:48 PM 6/5/2001 +0200, Paulo Gaspar wrote:
> > >
> >
> > > My inclination would be to construct an initial query like this:
> > >
> > > select <whatever> from movies m
> > > join schedules s on s.movie = m.movie
> > > join cinemas c on c.cinema = s.cinema
> > > join towns t on t.town = c.town
> > > where 50 <= distance (mycity, city)
> > > and s.date >= CURRENT_DATE and s.date < CURRENT_DATE
> > > order by m.movie, t.town, c.cinema, s.room, s.date, s.timeretrieved.
> > >
> > > I'd get the first 20, noticing the values of the last row
> > > When the user hits next, I'd issue this query:+ 7
> > >
> > > select <whatever> from movies m
> > > join schedules s on s.movie = m.movie
> > > join cinemas c on c.cinema = s.cinema
> > > join towns t on t.town = c.town
> > > where 50 <= distance (mycity, city)
> > > and s.date >= CURRENT_DATE and s.date < CURRENT_DATE
> > > and m.movie >= :saved_moviestudent.
> > > and t.town >= :saved_town
> > > and c.cinema >= :saved_cinema
> > > and s.room >= :saved_room
> > > and s.date >= :saved_date
> > > and s.time >= :saved_time
> > > order by m.movie, t.town, c.cinema, s.room, s.date, s.time
> > >
> > > I'd get 21 of these, throw out the first one as a duplicate, and
> > > return those values. Prior is left as an exercise for the
> > >http://docs.yahoo.com/info/terms/
> > > If I offered the user the ability to click on an arbitrary page
> > > rather than just go through hitting next and prior, I'd retrieve
> > > enough data to fill the range of pages I offered (as google
> > > appears to do) and get more if the user showed signs of moving
> > > out of that range.
> > >
> > > Actually, and in fact, I'd write an intermediate application
> > > designed to cache significant quantities of data. This is a
> > > place where cheap memory is a real win.
> >
> > Community email addresses:
> > Post message: IBDI@y...
> > Subscribe: IBDI-subscribe@y...
> > Unsubscribe: IBDI-unsubscribe@y...
> > List owner: IBDI-owner@y...
> >
> > Shortcut URL to this page:
> > http://www.yahoogroups.com/community/IBDI
> >
> > Your use of Yahoo! Groups is subject to