Cursor (databases) |
In . Cursors allow row-by-row processing of the result sets.
Types of cursors: Static, Dynamic, Forward-only, Keyset-driven.
Disadvantages of cursors: Each time you fetch a row from the cursor, it results in a network round trip, where as a normal SELECT query makes only one round trip, however large the result set is. Cursors are also costly because they require more resources and temporary storage (results in more Input/output operations). Further, there are restrictions on the Select (SQL) that can be used with some types of cursors.
Most of the times, set based operations can be used instead of cursors.
=References=
*Chris J. Date: Database in Depth , O Reilly & Associates, ISBN 0-596-10012-4 *Thomas M. Connolly, Carolyn E. Begg: Database Systems , Addison-Wesley, ISBN 0-321-21025-5 *Ramiz Elmasri, Shamkant B. Navathe: Fundamentals of Database Systems , Addison-Wesley, ISBN 0201542633 *Neil Matthew, Richard Stones: Beginning Databases with PostgreSQL: From Novice to Professional , Apress, ISBN 1590594789 *Thomas Kyte: Expert One-On-One: Oracle , Apress, ISBN 1-59059-525-4
=See also=
=External links=
*[http://msdn.microsoft.com/library/en-us/odbc/htm/odbcscrollable_cursors.asp Description from ODBC Programmer s Reference] *[http://c2.com/cgi/wikiDistributedCursor Descriptions from Portland Pattern Repository] *[http://www.postgresql.org/docs/8.0/interactive/plpgsql-cursors.html PostgreSQL Documentation] *[http://sleepycat.com/docs/ref/am/cursor.html Berkeley DB Reference Guide: Cursor operations] *[http://java.sun.com/docs/books/tutorial/jdbc/jdbc2dot0/cursor.html Moving the Cursor in Scrollable Result Sets] *[http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/resultset.html ResultSet in JDBC] *[http://doc.trolltech.com/4.0/q3sqlcursor.html Q3SqlCursor Class Reference] *[http://www.oracle.com/technology/products/oracle9i/daily/mar15.html OCI Scrollable Cursor] *[http://de2.php.net/manual/en/function.oci-new-cursor.php function oci_new_cursor] *[http://citeseer.ifi.unizh.ch/cisq=database+cursors Citations by CiteSeer] *[http://dev.mysql.com/doc/refman/5.0/en/cursors.html MySQL s Cursor Documentation]|
|