You know that cursors allow you to access the selected data for more or less free, that is, you create a set of stable data rows (keep the same rows) that you can rotate through them and do what you want. / p>
This is interesting because the data volume can be very large and loading everything can be a memory and load problem, so you can pick up the parts that interest you.
It is also useful because you may need to do complex analysis and processing that depends on code interactions as you "walk" through the data. In a way we can say that it can do streaming of the data. If it is something simple it is possible to do without cursors through the LIMIT
and OFFSET
clauses or similar alternatives of each database.
Some applications may need to receive data this way. Although it may bring inefficiencies.
It does not have to be this way, but it's usually more useful for DBAs or programmers who act like DBAs, in application queries the utility is less. Almost always the difficulties of using it correctly makes you think of a simpler and more reliable alternative.
Each database has its peculiarities, the question would be very wide to talk about the operation of each one.