<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Cursors Again</title>
	<atom:link href="http://awads.net/wp/2007/06/21/cursors-again/feed/" rel="self" type="application/rss+xml" />
	<link>http://awads.net/wp/2007/06/21/cursors-again/</link>
	<description>News, views, tips and tricks on Oracle and other fun stuff</description>
	<pubDate>Thu, 07 Aug 2008 23:33:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Patrick Barel</title>
		<link>http://awads.net/wp/2007/06/21/cursors-again/#comment-51033</link>
		<dc:creator>Patrick Barel</dc:creator>
		<pubDate>Sat, 23 Jun 2007 08:29:50 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2007/06/21/cursors-again/#comment-51033</guid>
		<description>&lt;p&gt;How about using a Table API, like the QDA (Quest Development Architecture) provided by Quest CodeGen Utility. That way, developers don't need to write any SQL anymore. Whether you decide to use explicit cursors or implicit cursors is up to the developer(s) maintaining the Table API. The other developers don't need to worry about how the SQL is done, they just call a procedure to get the information they need. If the underlying table structure changes, you just need to change the implementation of the TAPI, which helps in Single Point Of Definition.
By the way, in our 'old' code, we tend to use explicit cursors, because we tend to forget to write all the exception handlers for selects in the code.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>How about using a Table API, like the QDA (Quest Development Architecture) provided by Quest CodeGen Utility. That way, developers don&#8217;t need to write any SQL anymore. Whether you decide to use explicit cursors or implicit cursors is up to the developer(s) maintaining the Table API. The other developers don&#8217;t need to worry about how the SQL is done, they just call a procedure to get the information they need. If the underlying table structure changes, you just need to change the implementation of the TAPI, which helps in Single Point Of Definition.<br />
By the way, in our &#8216;old&#8217; code, we tend to use explicit cursors, because we tend to forget to write all the exception handlers for selects in the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joel garry</title>
		<link>http://awads.net/wp/2007/06/21/cursors-again/#comment-51031</link>
		<dc:creator>joel garry</dc:creator>
		<pubDate>Fri, 22 Jun 2007 21:53:41 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2007/06/21/cursors-again/#comment-51031</guid>
		<description>&lt;p&gt;Perhaps an olde mythe from pre-7.3 days:
http://www.jlcomp.demon.co.uk/faq/exp_cursor.html&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Perhaps an olde mythe from pre-7.3 days:<br />
<a href="http://www.jlcomp.demon.co.uk/faq/exp_cursor.html" rel="nofollow">http://www.jlcomp.demon.co.uk/faq/exp_cursor.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eddie Awad</title>
		<link>http://awads.net/wp/2007/06/21/cursors-again/#comment-51030</link>
		<dc:creator>Eddie Awad</dc:creator>
		<pubDate>Fri, 22 Jun 2007 20:12:16 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2007/06/21/cursors-again/#comment-51030</guid>
		<description>&lt;p&gt;Dominic, I could not agree more. Old habits are hard to break. I believe that knowing &lt;a href="http://awads.net/wp/2006/05/09/whats-new-is-important/" rel="nofollow"&gt;what's new&lt;/a&gt; is very essential to staying up to date and improving your skills.&lt;/p&gt;

&lt;p&gt;Steeve, I believe adding a RAISE in the when NO_DATA_FOUND exception depends on the application logic. However, whenever you have WHEN OTHERS it is almost always the case that you would want to add RAISE.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dominic, I could not agree more. Old habits are hard to break. I believe that knowing <a href="http://awads.net/wp/2006/05/09/whats-new-is-important/" rel="nofollow">what&#8217;s new</a> is very essential to staying up to date and improving your skills.</p>
<p>Steeve, I believe adding a RAISE in the when NO_DATA_FOUND exception depends on the application logic. However, whenever you have WHEN OTHERS it is almost always the case that you would want to add RAISE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steeve Bisson</title>
		<link>http://awads.net/wp/2007/06/21/cursors-again/#comment-51028</link>
		<dc:creator>Steeve Bisson</dc:creator>
		<pubDate>Fri, 22 Jun 2007 15:09:09 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2007/06/21/cursors-again/#comment-51028</guid>
		<description>&lt;p&gt;I would add the raise in the exception code.&lt;/p&gt;

&lt;p&gt;EXCEPTION
   WHEN NO_DATA_FOUND
   THEN
      DBMS_OUTPUT.put_line (â€˜Not foundâ€™);
      RAISE;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I would add the raise in the exception code.</p>
<p>EXCEPTION<br />
   WHEN NO_DATA_FOUND<br />
   THEN<br />
      DBMS_OUTPUT.put_line (â€˜Not foundâ€™);<br />
      RAISE;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dominic Brooks</title>
		<link>http://awads.net/wp/2007/06/21/cursors-again/#comment-51026</link>
		<dc:creator>Dominic Brooks</dc:creator>
		<pubDate>Fri, 22 Jun 2007 07:37:01 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2007/06/21/cursors-again/#comment-51026</guid>
		<description>&lt;p&gt;I suppose that good practice changes over time and depending on when the code was first written or when the developer learned his trade, explicit cursors were favoured over implicit cursors and used to have a slight performance advantage, etc.&lt;/p&gt;

&lt;p&gt;Times change, software changes and best practice evolves but a lot of time people don't keep on top of this evolution and stick to the what they used to know.&lt;/p&gt;

&lt;p&gt;And he probably had a friend who overheard a conversation in the pub about a rumour that you should always check that your cursor is closed before you open it.&lt;/p&gt;

&lt;p&gt;Anyway, it does look sort of old fashioned these days and your implicit version is both neater and also allegedly slightly better performing in any recent version.&lt;/p&gt;

&lt;p&gt;But we're probably all guilty of using bits of code automatically and without thinking. For example, I think I've just about got out of the habit of creating table types indexed by binary_integer rather than pls_integer. And frequently look at some of my code to find that I'm iterating through a sparse collection using FOR i IN x.FIRST ... x.LAST, etc.&lt;/p&gt;

&lt;p&gt;That's why code reviews can be such a good thing in that they can stop and make you think again about what you've done.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I suppose that good practice changes over time and depending on when the code was first written or when the developer learned his trade, explicit cursors were favoured over implicit cursors and used to have a slight performance advantage, etc.</p>
<p>Times change, software changes and best practice evolves but a lot of time people don&#8217;t keep on top of this evolution and stick to the what they used to know.</p>
<p>And he probably had a friend who overheard a conversation in the pub about a rumour that you should always check that your cursor is closed before you open it.</p>
<p>Anyway, it does look sort of old fashioned these days and your implicit version is both neater and also allegedly slightly better performing in any recent version.</p>
<p>But we&#8217;re probably all guilty of using bits of code automatically and without thinking. For example, I think I&#8217;ve just about got out of the habit of creating table types indexed by binary_integer rather than pls_integer. And frequently look at some of my code to find that I&#8217;m iterating through a sparse collection using FOR i IN x.FIRST &#8230; x.LAST, etc.</p>
<p>That&#8217;s why code reviews can be such a good thing in that they can stop and make you think again about what you&#8217;ve done.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
