<?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: Foreign Keys</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Mon, 20 May 2013 01:44:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Null &#8211; again &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/#comment-49923</link>
		<dc:creator><![CDATA[Null &#8211; again &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Thu, 06 Sep 2012 17:42:16 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2009/04/30/foreign-keys/#comment-49923</guid>
		<description><![CDATA[[...] as the cause of unexpected behaviour. Remember that a constraint accepts a value if the constraint does not evaluate to false. If you put &#8216;B&#8217; into the constraint definition above, we [...]]]></description>
		<content:encoded><![CDATA[<p>[...] as the cause of unexpected behaviour. Remember that a constraint accepts a value if the constraint does not evaluate to false. If you put &#8216;B&#8217; into the constraint definition above, we [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Foreign Keys &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/#comment-34805</link>
		<dc:creator><![CDATA[Foreign Keys &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Thu, 05 Nov 2009 21:31:15 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2009/04/30/foreign-keys/#comment-34805</guid>
		<description><![CDATA[[...] 5th Nov 2009: and here&#8217;s another common issue about foreign keys that I also addressed by a link to OTN some time [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 5th Nov 2009: and here&#8217;s another common issue about foreign keys that I also addressed by a link to OTN some time [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Statistique</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/#comment-32903</link>
		<dc:creator><![CDATA[Statistique]]></dc:creator>
		<pubDate>Tue, 05 May 2009 18:56:55 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2009/04/30/foreign-keys/#comment-32903</guid>
		<description><![CDATA[Joel and Jonathan,

Do you guys have any idea why Oracle Applications (Oracle ERP) doesn&#039;t have any primary key and foreign key constraints (for version 11.5.9, I don&#039;t know about later version).

For me it doesn&#039;t make sense that Oracle Applications doesn&#039;t fully use the power offered by Oracle database. I&#039;m missing something ???]]></description>
		<content:encoded><![CDATA[<p>Joel and Jonathan,</p>
<p>Do you guys have any idea why Oracle Applications (Oracle ERP) doesn&#8217;t have any primary key and foreign key constraints (for version 11.5.9, I don&#8217;t know about later version).</p>
<p>For me it doesn&#8217;t make sense that Oracle Applications doesn&#8217;t fully use the power offered by Oracle database. I&#8217;m missing something ???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/#comment-32896</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Tue, 05 May 2009 17:48:59 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2009/04/30/foreign-keys/#comment-32896</guid>
		<description><![CDATA[Brian,

If you want to say that a foreign key checks for existence in a set then it should be clear that the element (&#039;Smith&#039;,null) is not a member of the set {(&#039;Smith&#039;,&#039;John&#039;)}.


Val is correct, by the way, I am aware of the difference between relational and hierarchical databases. The parent/child example was perhaps not the best choice.]]></description>
		<content:encoded><![CDATA[<p>Brian,</p>
<p>If you want to say that a foreign key checks for existence in a set then it should be clear that the element (&#8216;Smith&#8217;,null) is not a member of the set {(&#8216;Smith&#8217;,'John&#8217;)}.</p>
<p>Val is correct, by the way, I am aware of the difference between relational and hierarchical databases. The parent/child example was perhaps not the best choice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joel garry</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/#comment-32894</link>
		<dc:creator><![CDATA[joel garry]]></dc:creator>
		<pubDate>Tue, 05 May 2009 00:35:28 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2009/04/30/foreign-keys/#comment-32894</guid>
		<description><![CDATA[Oh, I thought you didn&#039;t specify the primary key because I work on an ERP system with thousands of tables... and no primary keys!  :-)

(db blind, integrity in app, blablabla.  Does have optional not null in db columns, though.)

(And the OTN post does say &quot;compost with two columns&quot;, quite an appropriate visualization there.  Explanation for our English as a second language friends, that means making fertile soil additive.)]]></description>
		<content:encoded><![CDATA[<p>Oh, I thought you didn&#8217;t specify the primary key because I work on an ERP system with thousands of tables&#8230; and no primary keys!  :-)</p>
<p>(db blind, integrity in app, blablabla.  Does have optional not null in db columns, though.)</p>
<p>(And the OTN post does say &#8220;compost with two columns&#8221;, quite an appropriate visualization there.  Explanation for our English as a second language friends, that means making fertile soil additive.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Tkatch</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/#comment-32891</link>
		<dc:creator><![CDATA[Brian Tkatch]]></dc:creator>
		<pubDate>Mon, 04 May 2009 15:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2009/04/30/foreign-keys/#comment-32891</guid>
		<description><![CDATA[Val, good point. Perhaps we can reword the comment though to the SQL of the standard is inconsistent. The meaning, however, is not. An FK checks for existence in a set, regardless of the SQL definition of IN() which treats NULL specially.]]></description>
		<content:encoded><![CDATA[<p>Val, good point. Perhaps we can reword the comment though to the SQL of the standard is inconsistent. The meaning, however, is not. An FK checks for existence in a set, regardless of the SQL definition of IN() which treats NULL specially.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Val</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/#comment-32890</link>
		<dc:creator><![CDATA[Val]]></dc:creator>
		<pubDate>Mon, 04 May 2009 15:28:28 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2009/04/30/foreign-keys/#comment-32890</guid>
		<description><![CDATA[Brian,

I am pretty sure that Jonathan is aware of the fact that the foreign constraint is a set membership predicate rather than a hierarchical construct.  The parent-child mental image is just a convenient point of view,  nothing more.

Further, Jonathan is correct in saying that the standard is inconsistent. Consider:

1. S = {1,2,3} and x= null;

2. S = {1,2,3, null} and x = 7;

where S is a set of values against which the foreign constraint is checked and x is the value being checked.

In both cases the &#039;x in S&#039; predicate evaluates to NULL and yet only the first case passes the constraint.  I cannot speculate on why the standard is inconsistent since I did not see any published rationale for such behavior.]]></description>
		<content:encoded><![CDATA[<p>Brian,</p>
<p>I am pretty sure that Jonathan is aware of the fact that the foreign constraint is a set membership predicate rather than a hierarchical construct.  The parent-child mental image is just a convenient point of view,  nothing more.</p>
<p>Further, Jonathan is correct in saying that the standard is inconsistent. Consider:</p>
<p>1. S = {1,2,3} and x= null;</p>
<p>2. S = {1,2,3, null} and x = 7;</p>
<p>where S is a set of values against which the foreign constraint is checked and x is the value being checked.</p>
<p>In both cases the &#8216;x in S&#8217; predicate evaluates to NULL and yet only the first case passes the constraint.  I cannot speculate on why the standard is inconsistent since I did not see any published rationale for such behavior.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Tkatch</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/#comment-32888</link>
		<dc:creator><![CDATA[Brian Tkatch]]></dc:creator>
		<pubDate>Mon, 04 May 2009 12:12:34 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2009/04/30/foreign-keys/#comment-32888</guid>
		<description><![CDATA[Relational databases are not hierarchical, as such FKs do not implement a hierarchy. We may use it for hierarchy, created  &quot;parent&quot; and &quot;child&quot;, but that is not what is actually created. An FK is Relational Integrity, it makes sure that the referencing COLUMN specifies what is already there, or nothing at all (perhaps the major use of NULL).

So, to me, FK aren&#039;t evaluating A=B, but A IN(B). ADD a NOT NULL CONSTRAINT, and then we do have a child which is evaluated as you explain.]]></description>
		<content:encoded><![CDATA[<p>Relational databases are not hierarchical, as such FKs do not implement a hierarchy. We may use it for hierarchy, created  &#8220;parent&#8221; and &#8220;child&#8221;, but that is not what is actually created. An FK is Relational Integrity, it makes sure that the referencing COLUMN specifies what is already there, or nothing at all (perhaps the major use of NULL).</p>
<p>So, to me, FK aren&#8217;t evaluating A=B, but A IN(B). ADD a NOT NULL CONSTRAINT, and then we do have a child which is evaluated as you explain.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
