<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Constraints</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2011/02/21/constraints-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2011/02/21/constraints-2/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Wed, 19 Jun 2013 12:03:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Sokrates</title>
		<link>http://jonathanlewis.wordpress.com/2011/02/21/constraints-2/#comment-41746</link>
		<dc:creator><![CDATA[Sokrates]]></dc:creator>
		<pubDate>Mon, 19 Sep 2011 18:31:45 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5785#comment-41746</guid>
		<description><![CDATA[Kamal,

yes, I did]]></description>
		<content:encoded><![CDATA[<p>Kamal,</p>
<p>yes, I did</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamal</title>
		<link>http://jonathanlewis.wordpress.com/2011/02/21/constraints-2/#comment-41745</link>
		<dc:creator><![CDATA[Kamal]]></dc:creator>
		<pubDate>Mon, 19 Sep 2011 18:07:45 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5785#comment-41745</guid>
		<description><![CDATA[Did Sokrates mean this?

http://en.wikipedia.org/wiki/Tautology_%28logic%29#Efficient_verification_and_the_Boolean_satisfiability_problem

Kind regards

-- 
Kamal]]></description>
		<content:encoded><![CDATA[<p>Did Sokrates mean this?</p>
<p><a href="http://en.wikipedia.org/wiki/Tautology_%28logic%29#Efficient_verification_and_the_Boolean_satisfiability_problem" rel="nofollow">http://en.wikipedia.org/wiki/Tautology_%28logic%29#Efficient_verification_and_the_Boolean_satisfiability_problem</a></p>
<p>Kind regards</p>
<p>&#8211;<br />
Kamal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NULL &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2011/02/21/constraints-2/#comment-41744</link>
		<dc:creator><![CDATA[NULL &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Mon, 19 Sep 2011 16:58:47 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5785#comment-41744</guid>
		<description><![CDATA[[...] As a follow on from this: a predicate applied to a dataset will return rows only when it evaluates to TRUE; a constraint will allow rows to be inserted into a table if if doesn&#8217;t evaluate to FALSE. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] As a follow on from this: a predicate applied to a dataset will return rows only when it evaluates to TRUE; a constraint will allow rows to be inserted into a table if if doesn&#8217;t evaluate to FALSE. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Log Buffer #214, A Carnival of the Vanities for DBAs &#124; The Pythian Blog</title>
		<link>http://jonathanlewis.wordpress.com/2011/02/21/constraints-2/#comment-39771</link>
		<dc:creator><![CDATA[Log Buffer #214, A Carnival of the Vanities for DBAs &#124; The Pythian Blog]]></dc:creator>
		<pubDate>Mon, 28 Feb 2011 14:04:19 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5785#comment-39771</guid>
		<description><![CDATA[[...] Jonathan Lewis reminds about a subtle difference between a predicate and the constraint. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Jonathan Lewis reminds about a subtle difference between a predicate and the constraint. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2011/02/21/constraints-2/#comment-39691</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 24 Feb 2011 08:01:34 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5785#comment-39691</guid>
		<description><![CDATA[Interesting point - but arguably this does more to enforce the idea that the NOT NULL constraint is a special case that is inconsistent in more ways than one with all other uses of constraints. 

So the purist may say it shouldn&#039;t happen, while the pragmatist might suggest that more cases should take advantage of the optimisation.  (Why am I generating undo and redo for a row when I have a constraint that tells me it&#039;s going to be rejected ?)]]></description>
		<content:encoded><![CDATA[<p>Interesting point &#8211; but arguably this does more to enforce the idea that the NOT NULL constraint is a special case that is inconsistent in more ways than one with all other uses of constraints. </p>
<p>So the purist may say it shouldn&#8217;t happen, while the pragmatist might suggest that more cases should take advantage of the optimisation.  (Why am I generating undo and redo for a row when I have a constraint that tells me it&#8217;s going to be rejected ?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joel garry</title>
		<link>http://jonathanlewis.wordpress.com/2011/02/21/constraints-2/#comment-39685</link>
		<dc:creator><![CDATA[joel garry]]></dc:creator>
		<pubDate>Wed, 23 Feb 2011 22:30:39 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5785#comment-39685</guid>
		<description><![CDATA[Is it really a purist defect?  The difference is in the Check Constraint link cited above; the check constraint is done after the statement runs, as a rollback.  Perhaps it isn&#039;t logically inconsistent to disable the integrity constraint, see if a transaction works, then roll it back with the check constraint.  Whether Oracle can actually do that I haven&#039;t considered.]]></description>
		<content:encoded><![CDATA[<p>Is it really a purist defect?  The difference is in the Check Constraint link cited above; the check constraint is done after the statement runs, as a rollback.  Perhaps it isn&#8217;t logically inconsistent to disable the integrity constraint, see if a transaction works, then roll it back with the check constraint.  Whether Oracle can actually do that I haven&#8217;t considered.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sokrates</title>
		<link>http://jonathanlewis.wordpress.com/2011/02/21/constraints-2/#comment-39680</link>
		<dc:creator><![CDATA[Sokrates]]></dc:creator>
		<pubDate>Wed, 23 Feb 2011 12:15:19 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5785#comment-39680</guid>
		<description><![CDATA[&lt;cite&gt;The fact that some reductions to “is not null” may not be feasible doesn’t mean that an explicit “is not null” should be treated differently from a NOT NULL check, though.&lt;/cite&gt;

ok, agree - like many others 
see for example
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2665514800346181577#2666924900346321646

(has someone filed an enhancement request ?)]]></description>
		<content:encoded><![CDATA[<p><cite>The fact that some reductions to “is not null” may not be feasible doesn’t mean that an explicit “is not null” should be treated differently from a NOT NULL check, though.</cite></p>
<p>ok, agree &#8211; like many others<br />
see for example<br />
<a href="http://asktom.oracle.com/pls/apex/f?p=100:11:0" rel="nofollow">http://asktom.oracle.com/pls/apex/f?p=100:11:0</a>::::P11_QUESTION_ID:2665514800346181577#2666924900346321646</p>
<p>(has someone filed an enhancement request ?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2011/02/21/constraints-2/#comment-39677</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Wed, 23 Feb 2011 10:54:55 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5785#comment-39677</guid>
		<description><![CDATA[Okay, let me modify that:

&lt;i&gt;
&quot;…if the optimizer were good enough it would be able to infer the “column is not null” condition from any logical equivalent that hadn&#039;t been written by a mathematician with a warped sense of humour, and ought to optimise accordingly&quot;
&lt;/i&gt; ;)

I think your conjecture seems reasonable -  an intuitive view (not that I like to trust my intuition) would be that the constraint problem is the tautology problem extended to three-valued logic, and the tautology problem couldn&#039;t be NP-hard if the constraint problem weren&#039;t.

The fact that some reductions to &quot;is not null&quot; may not be feasible doesn&#039;t mean that an explicit &quot;is not null&quot; should be treated differently from a NOT NULL check, though.]]></description>
		<content:encoded><![CDATA[<p>Okay, let me modify that:</p>
<p><i><br />
&#8220;…if the optimizer were good enough it would be able to infer the “column is not null” condition from any logical equivalent that hadn&#8217;t been written by a mathematician with a warped sense of humour, and ought to optimise accordingly&#8221;<br />
</i> ;)</p>
<p>I think your conjecture seems reasonable &#8211;  an intuitive view (not that I like to trust my intuition) would be that the constraint problem is the tautology problem extended to three-valued logic, and the tautology problem couldn&#8217;t be NP-hard if the constraint problem weren&#8217;t.</p>
<p>The fact that some reductions to &#8220;is not null&#8221; may not be feasible doesn&#8217;t mean that an explicit &#8220;is not null&#8221; should be treated differently from a NOT NULL check, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Houri Mohamed</title>
		<link>http://jonathanlewis.wordpress.com/2011/02/21/constraints-2/#comment-39666</link>
		<dc:creator><![CDATA[Houri Mohamed]]></dc:creator>
		<pubDate>Tue, 22 Feb 2011 14:38:45 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5785#comment-39666</guid>
		<description><![CDATA[The same thing can be said about the Foreign key integrity constraint

http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/#more-1101

Best Regards

Mohamed Houri]]></description>
		<content:encoded><![CDATA[<p>The same thing can be said about the Foreign key integrity constraint</p>
<p><a href="http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/#more-1101" rel="nofollow">http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/#more-1101</a></p>
<p>Best Regards</p>
<p>Mohamed Houri</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sokrates</title>
		<link>http://jonathanlewis.wordpress.com/2011/02/21/constraints-2/#comment-39665</link>
		<dc:creator><![CDATA[Sokrates]]></dc:creator>
		<pubDate>Tue, 22 Feb 2011 13:27:09 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5785#comment-39665</guid>
		<description><![CDATA[&lt;cite&gt;...if the optimizer were good enough it would be able to infer the “column is not null” condition from any logical equivalent, and ought to optimise accordingly...&lt;/cite&gt;

I would conjecture - though I cannot prove it - that this ( &quot;given an SQL-Expression expr(column), is it logically equivalent to &#039;column is not null&#039; ?&quot;) is as hard as the tautology problem (&quot;given a Boolean formula, is it equivalent to &#039;0=0&#039; ?&quot;), which is known to be NP-hard]]></description>
		<content:encoded><![CDATA[<p><cite>&#8230;if the optimizer were good enough it would be able to infer the “column is not null” condition from any logical equivalent, and ought to optimise accordingly&#8230;</cite></p>
<p>I would conjecture &#8211; though I cannot prove it &#8211; that this ( &#8220;given an SQL-Expression expr(column), is it logically equivalent to &#8216;column is not null&#8217; ?&#8221;) is as hard as the tautology problem (&#8220;given a Boolean formula, is it equivalent to &#8217;0=0&#8242; ?&#8221;), which is known to be NP-hard</p>
]]></content:encoded>
	</item>
</channel>
</rss>
