|
Posted by Doug on 02/01/06 03:43
>We are set based. And a set in a relational database is a collection of
rows with no implied order.
>A cursor is not a set - it is an operation to turn a set into a series
of rows, with implied order.
A cursor does NOT require an order. Further, a cursor does NOT require
an implied order. I believe we agree on the above two statements?
If so, then perhaps another description of a cursor might be "an
operation or contstruct that allows the traversing of a set." You use
a cursor when you need to conduct complex logic on each member of a
set. Normally, you start at one end, examine and perform logic on each
member. Then, you proceed to the next member.
The very first member can be thought of as the "first." You might then
proceed to the "next." You usually end up with the "last."
No where in my usage did I define order. Typically, I look at each
member of the set once.
I never have used cursors a lot, but sometimes the business logic, or
program logic, really makes a cursor useful.
Kindest regards,
Doug
[Back to original message]
|