<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Oracle SQL and PL/SQL Bad Practices Document</title>
	<atom:link href="http://awads.net/wp/2008/03/09/oracle-sql-and-plsql-bad-practices-document/feed/" rel="self" type="application/rss+xml" />
	<link>http://awads.net/wp/2008/03/09/oracle-sql-and-plsql-bad-practices-document/</link>
	<description>News, views, tips and tricks on Oracle and other fun stuff</description>
	<lastBuildDate>Fri, 26 Feb 2010 18:04:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Log Buffer #88: a Carnival of the Vanities for DBAs</title>
		<link>http://awads.net/wp/2008/03/09/oracle-sql-and-plsql-bad-practices-document/comment-page-1/#comment-52033</link>
		<dc:creator>Log Buffer #88: a Carnival of the Vanities for DBAs</dc:creator>
		<pubDate>Fri, 14 Mar 2008 16:55:27 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2008/03/09/oracle-sql-and-plsql-bad-practices-document/#comment-52033</guid>
		<description>&lt;p&gt;[...] Awad gives us the Oracle SQL and PL/SQL Bad Practices Document, which &#8220;.&#160;.&#160;.&#160;contains patterns of bad SQL and PL/SQL code that Gojko Adzic [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Awad gives us the Oracle SQL and PL/SQL Bad Practices Document, which &#8220;.&nbsp;.&nbsp;.&nbsp;contains patterns of bad SQL and PL/SQL code that Gojko Adzic [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Eddie Awad</title>
		<link>http://awads.net/wp/2008/03/09/oracle-sql-and-plsql-bad-practices-document/comment-page-1/#comment-52027</link>
		<dc:creator>Eddie Awad</dc:creator>
		<pubDate>Tue, 11 Mar 2008 05:08:11 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2008/03/09/oracle-sql-and-plsql-bad-practices-document/#comment-52027</guid>
		<description>&lt;p&gt;@Noons: You&#039;re right, some of them are about database and application design, which I think is indirectly related to SQL and PL/SQL as this is how you access and manipulate the application data.&lt;/p&gt;

&lt;p&gt;@John: yes, it makes sense to use a tool to generate packages for API access to table data. I believe Quest CodeGen Utility http://qcgu.net/ can do that for you.&lt;/p&gt;

&lt;p&gt;@gary: I agree with you. One approach is to wrap all SQL, complex or not, into separate functions.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Noons: You&#8217;re right, some of them are about database and application design, which I think is indirectly related to SQL and PL/SQL as this is how you access and manipulate the application data.</p>

<p>@John: yes, it makes sense to use a tool to generate packages for API access to table data. I believe Quest CodeGen Utility <a href="http://qcgu.net/" rel="nofollow">http://qcgu.net/</a> can do that for you.</p>

<p>@gary: I agree with you. One approach is to wrap all SQL, complex or not, into separate functions.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: gary</title>
		<link>http://awads.net/wp/2008/03/09/oracle-sql-and-plsql-bad-practices-document/comment-page-1/#comment-52026</link>
		<dc:creator>gary</dc:creator>
		<pubDate>Mon, 10 Mar 2008 21:54:46 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2008/03/09/oracle-sql-and-plsql-bad-practices-document/#comment-52026</guid>
		<description>&lt;p&gt;The &#039;embedding complex SQL into PL/SQL&#039; argument is flawed. If you have to change the view, it will still invalidate the dependent objects (ie the package) which will then be recompiled when next invoked.
You&#039;ve also got two objects to deal with. Not necessarily a bad thing if the view can be re-used. But you are likely to be faced with the choice of putting filter conditions within the view itself, or as part of the query against the view.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>The &#8216;embedding complex SQL into PL/SQL&#8217; argument is flawed. If you have to change the view, it will still invalidate the dependent objects (ie the package) which will then be recompiled when next invoked.
You&#8217;ve also got two objects to deal with. Not necessarily a bad thing if the view can be re-used. But you are likely to be faced with the choice of putting filter conditions within the view itself, or as part of the query against the view.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: John Flack</title>
		<link>http://awads.net/wp/2008/03/09/oracle-sql-and-plsql-bad-practices-document/comment-page-1/#comment-52024</link>
		<dc:creator>John Flack</dc:creator>
		<pubDate>Mon, 10 Mar 2008 13:38:14 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2008/03/09/oracle-sql-and-plsql-bad-practices-document/#comment-52024</guid>
		<description>&lt;p&gt;I&#039;ve done both PL/SQL APIs to do DML and views with instead of triggers.  The PL/SQL APIs are mostly generated by Oracle Designer and used for Designer Web PL/SQL application generation.  We wrote our own APIs for a few applications and had a major problem with the ones we wrote because they use a parameter for every column in the associated table.  This quickly becomes a maintenance nightmare - adding a new column means that you have to change EVERY module that calls the API.  If you are going to write an API, Designer&#039;s format is better - two parameters that are PL/SQL records, the first a data record, the second a record with a boolean for each column telling whether to use this value in the DML.&lt;/p&gt;

&lt;p&gt;But what I really prefer is views with Instead of triggers.  You get all of the benefit of using an API, but you can use any tool that expects to be updating a table.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve done both PL/SQL APIs to do DML and views with instead of triggers.  The PL/SQL APIs are mostly generated by Oracle Designer and used for Designer Web PL/SQL application generation.  We wrote our own APIs for a few applications and had a major problem with the ones we wrote because they use a parameter for every column in the associated table.  This quickly becomes a maintenance nightmare &#8211; adding a new column means that you have to change EVERY module that calls the API.  If you are going to write an API, Designer&#8217;s format is better &#8211; two parameters that are PL/SQL records, the first a data record, the second a record with a boolean for each column telling whether to use this value in the DML.</p>

<p>But what I really prefer is views with Instead of triggers.  You get all of the benefit of using an API, but you can use any tool that expects to be updating a table.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Noons</title>
		<link>http://awads.net/wp/2008/03/09/oracle-sql-and-plsql-bad-practices-document/comment-page-1/#comment-52022</link>
		<dc:creator>Noons</dc:creator>
		<pubDate>Mon, 10 Mar 2008 07:56:46 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/2008/03/09/oracle-sql-and-plsql-bad-practices-document/#comment-52022</guid>
		<description>&lt;p&gt;The problem with most &quot;bad practices&quot; documents is that almost without exception they exceed the boundaries of their own definitions.&lt;/p&gt;

&lt;p&gt;Witness the title, which apparently refers to only SQL and PL/SQL and then the following claims which have &lt;em&gt;nothing&lt;/em&gt; to do with SQL or PL/SQL and are all about database and application &lt;em&gt;design&lt;/em&gt;:&lt;/p&gt;

&lt;p&gt;Storing ROWIDs for later reference,
Storing an empty LOB instead of NULL,
Use of magic numbers and strings instead of NULL.&lt;/p&gt;

&lt;p&gt;Talk about confusing the confused...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>The problem with most &#8220;bad practices&#8221; documents is that almost without exception they exceed the boundaries of their own definitions.</p>

<p>Witness the title, which apparently refers to only SQL and PL/SQL and then the following claims which have <em>nothing</em> to do with SQL or PL/SQL and are all about database and application <em>design</em>:</p>

<p>Storing ROWIDs for later reference,
Storing an empty LOB instead of NULL,
Use of magic numbers and strings instead of NULL.</p>

<p>Talk about confusing the confused&#8230;</p>]]></content:encoded>
	</item>
</channel>
</rss>
