Using Oracle ref cursors

I’ve written a small article about the use of oracle ref cursors in java. The article is in dutch and is available here.

Oracle ref cursors allow you to define queries in stored procedures in the database. They can be used in java by executing a call to the stored procedure and then looping through the resultset. The big advantage here is that the oracle developers can provide ready made queries to the java developers, so the java developers do not have to know a lot of sql. I see that a lot of java programmers do not know how to write good sql queries, and lack knowledge about the oracle optimizer and ways to determine query problems (explain plan,etc). Now you can leave this to the oracle developers, and the java developers can do what they are good at, writing java code.

blog comments powered by Disqus