<?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/"
		>
<channel>
	<title>Comments on: Tuple Rules! Using NVL2 and NULLIF.</title>
	<atom:link href="http://technology.amis.nl/2005/10/07/tuple-rules-using-nvl2-and-nullif/feed/" rel="self" type="application/rss+xml" />
	<link>http://technology.amis.nl/2005/10/07/tuple-rules-using-nvl2-and-nullif/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tuple-rules-using-nvl2-and-nullif</link>
	<description></description>
	<lastBuildDate>Fri, 12 Apr 2013 10:04:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Toon Koppelaars</title>
		<link>http://technology.amis.nl/2005/10/07/tuple-rules-using-nvl2-and-nullif/#comment-2503</link>
		<dc:creator>Toon Koppelaars</dc:creator>
		<pubDate>Fri, 07 Oct 2005 19:48:36 +0000</pubDate>
		<guid isPermaLink="false">/?p=833#comment-2503</guid>
		<description><![CDATA[OK, &#039;unequals&#039; should be done with &#039;&lt;&amp;gt&#039;, right?
alter table t add check(c1&lt;&gt;&#039;I&#039; or c2 is not null);
and
alter table t add check(c1&lt;&gt;&#039;O&#039; or c2 is null);]]></description>
		<content:encoded><![CDATA[<p>OK, &#8216;unequals&#8217; should be done with &#8216;&lt;&#038;gt&#8217;, right?<br />
alter table t add check(c1&lt;&gt;&#8217;I&#8217; or c2 is not null);<br />
and<br />
alter table t add check(c1&lt;&gt;&#8217;O&#8217; or c2 is null);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toon Koppelaars</title>
		<link>http://technology.amis.nl/2005/10/07/tuple-rules-using-nvl2-and-nullif/#comment-2502</link>
		<dc:creator>Toon Koppelaars</dc:creator>
		<pubDate>Fri, 07 Oct 2005 19:42:33 +0000</pubDate>
		<guid isPermaLink="false">/?p=833#comment-2502</guid>
		<description><![CDATA[Hmm. Some &#039;==&#039; disappeared. It should have read:
1) c1=â€™Iâ€™ &#039;==&gt;&#039; c2 is not null
and
2) c1=&#039;O&#039; &#039;==&gt;&#039; c2 is null]]></description>
		<content:encoded><![CDATA[<p>Hmm. Some &#8216;==&#8217; disappeared. It should have read:<br />
1) c1=â€™Iâ€™ &#8216;==>&#8217; c2 is not null<br />
and<br />
2) c1=&#8217;O&#8217; &#8216;==>&#8217; c2 is null</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toon Koppelaars</title>
		<link>http://technology.amis.nl/2005/10/07/tuple-rules-using-nvl2-and-nullif/#comment-2501</link>
		<dc:creator>Toon Koppelaars</dc:creator>
		<pubDate>Fri, 07 Oct 2005 19:40:17 +0000</pubDate>
		<guid isPermaLink="false">/?p=833#comment-2501</guid>
		<description><![CDATA[My 2 cents on this.

I understand you actually have two tuple rules:
1) c1=&#039;I&#039; ==&gt; c2 is not null
and
2) c1=&#039;O&#039; ==&gt; c2 is null
The &#039;==&gt;&#039; above, is the logical implication (read as &#039;implies&#039;).

To me this would then translate into two check constraints, enabling more detailed
error messages. Using the rewrite rule for implication: &quot;a implies b&quot;, is logically
equivalent to &quot;not a or b&quot;, this then results in:

alter table t add check(c1&lt;&gt;&#039;I&#039; or c2 is not null);
and
alter table t add check(c1&lt;&gt;&#039;O&#039; or c2 is null);

Nothing fancy here...

T.]]></description>
		<content:encoded><![CDATA[<p>My 2 cents on this.</p>
<p>I understand you actually have two tuple rules:<br />
1) c1=&#8217;I&#8217; ==> c2 is not null<br />
and<br />
2) c1=&#8217;O&#8217; ==> c2 is null<br />
The &#8216;==>&#8217; above, is the logical implication (read as &#8216;implies&#8217;).</p>
<p>To me this would then translate into two check constraints, enabling more detailed<br />
error messages. Using the rewrite rule for implication: &#8220;a implies b&#8221;, is logically<br />
equivalent to &#8220;not a or b&#8221;, this then results in:</p>
<p>alter table t add check(c1<>&#8216;I&#8217; or c2 is not null);<br />
and<br />
alter table t add check(c1<>&#8216;O&#8217; or c2 is null);</p>
<p>Nothing fancy here&#8230;</p>
<p>T.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent Schneider</title>
		<link>http://technology.amis.nl/2005/10/07/tuple-rules-using-nvl2-and-nullif/#comment-2500</link>
		<dc:creator>Laurent Schneider</dc:creator>
		<pubDate>Fri, 07 Oct 2005 15:23:50 +0000</pubDate>
		<guid isPermaLink="false">/?p=833#comment-2500</guid>
		<description><![CDATA[alter table t add constraint t_chk check (c1 = &#039;O&#039; and c2 is null or c1=&#039;I&#039; and c2 is not null)
should also be possible, and imho more human readable]]></description>
		<content:encoded><![CDATA[<p>alter table t add constraint t_chk check (c1 = &#8216;O&#8217; and c2 is null or c1=&#8217;I&#8217; and c2 is not null)<br />
should also be possible, and imho more human readable</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent Schneider</title>
		<link>http://technology.amis.nl/2005/10/07/tuple-rules-using-nvl2-and-nullif/#comment-2499</link>
		<dc:creator>Laurent Schneider</dc:creator>
		<pubDate>Fri, 07 Oct 2005 15:19:09 +0000</pubDate>
		<guid isPermaLink="false">/?p=833#comment-2499</guid>
		<description><![CDATA[what do you think of
c1 = &#039;O&#039; and c2 is null or c1=&#039;I&#039; and c2 is not null]]></description>
		<content:encoded><![CDATA[<p>what do you think of<br />
c1 = &#8216;O&#8217; and c2 is null or c1=&#8217;I&#8217; and c2 is not null</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andre</title>
		<link>http://technology.amis.nl/2005/10/07/tuple-rules-using-nvl2-and-nullif/#comment-2498</link>
		<dc:creator>Andre</dc:creator>
		<pubDate>Fri, 07 Oct 2005 10:40:54 +0000</pubDate>
		<guid isPermaLink="false">/?p=833#comment-2498</guid>
		<description><![CDATA[Nice, I just needed the same constraint on my project]]></description>
		<content:encoded><![CDATA[<p>Nice, I just needed the same constraint on my project</p>
]]></content:encoded>
	</item>
</channel>
</rss>
