A method and system for implementing scrollable cursors is described. A multi-tier
caching structure is maintained, in which a partial result set is cached at the
client computer and a more-complete result set is cached at the server computer.
If the cursor is scrolled in either the forward or backward directions, the partial
result set cached at the client computer is first checked to see if requested data
is present. If so, then the requested data is fetched from the client cache and
the current position of the cursor is moved to the appropriate position in the
result set. If the requested data is not present in the client cache, then those
data items are fetched from the cache at the server computer.