| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Is relational theory irrelevant?
In an attempt to throw the authorities off his trail, "Bob Badour" <bbadour_at_golden.net> transmitted:
> Certainly, any actual process involves the conceptual and the
> physical. What advantage to the logical model does the rank offer
> that is not offered by other logical constructs that already exist?
I'm not sure, either. I would have thought that taking the various "LIMIT" and "OFFSET" "TOP" keywords and standardizing it would be more sensible.
The rank functions look to me as though they have the potential to get _really_ expensive to evaluate, and not because they are buying some massive advantage.
Fabian Pascal presents, as a "standard" way of doing it,
SELECT a.ename, a.sale_amt
FROM sales a, sales b
WHERE a.sale_amt <= b.sale_amt
GROUP BY a.ename, a.sale_amt
HAVING COUNT(*) <= q
ORDER BY a.sale_amt
This query is _clever_; it is anything but straightforward, and I'd expect horrendous performance.
I'd much rather have something like
SELECT FIRST 5 [values] FROM [tables] ORDER BY [order];
I don't much care if it's:
There's a theoretic question of the difference between "first 5 rows" versus "first 5 'values'", where the latter might return 25 rows if there were a whole bunch of ties for first and third place. I'm content to be ambivalent about how that should be handled, because that seems to me to be context-dependent.
If I'm scoring a race, I may want the top 5 values, however many particpants that may pick. In other cases, I may simply want the first 5 rows, whatever they may be about.
-- (format nil "~S@~S" "aa454" "freenet.carleton.ca") http://www.ntlug.org/~cbbrowne/wp.html It is in the tranquillity of decomposition that I remember the long confused emotion which was my life.Received on Fri Nov 14 2003 - 15:52:41 CST
![]() |
![]() |