<?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: Referential Integrity with Virtual Columns</title>
	<atom:link href="http://technology.amis.nl/2008/07/15/referential-integrity-with-virtual-columns/feed/" rel="self" type="application/rss+xml" />
	<link>http://technology.amis.nl/2008/07/15/referential-integrity-with-virtual-columns/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=referential-integrity-with-virtual-columns</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: Alex Nuijten</title>
		<link>http://technology.amis.nl/2008/07/15/referential-integrity-with-virtual-columns/#comment-5407</link>
		<dc:creator>Alex Nuijten</dc:creator>
		<pubDate>Wed, 16 Jul 2008 13:44:51 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=3322#comment-5407</guid>
		<description><![CDATA[Thank you all for your comments. The suggestion done by Lucas and Nigel, I placed in a new post: http://technology.amis.nl/blog/?p=3325]]></description>
		<content:encoded><![CDATA[<p>Thank you all for your comments. The suggestion done by Lucas and Nigel, I placed in a new post: <a href="http://technology.amis.nl/blog/?p=3325" rel="nofollow">http://technology.amis.nl/blog/?p=3325</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nigel Thomas</title>
		<link>http://technology.amis.nl/2008/07/15/referential-integrity-with-virtual-columns/#comment-5406</link>
		<dc:creator>Nigel Thomas</dc:creator>
		<pubDate>Tue, 15 Jul 2008 15:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=3322#comment-5406</guid>
		<description><![CDATA[A common case for using a virtual column in a foreign key would be to enforce &quot;generic foreign keys&quot; - for example to the well known Oracle Designer CG_REF_CODES table.

create table CG_REF_CODES
( DOMAIN varchar2(20) not null
, LOW_VALUE    varchar2(30) not null
, DESCRIPTION varchar2(100)
, ...
);

For each referencing column we can define a virtual column that will be a constant (containing the value to match to CG_REF_CODES.DOMAIN).

So now we should be able to create a valid foreign key and not be concerned that there may be multiple rows in CG_REF_CODES with the same VALUE but different DOMAIN.

(Sorry, can&#039;t test this out as I don&#039;t have 11g installed on the laptop)

Regards Nigel]]></description>
		<content:encoded><![CDATA[<p>A common case for using a virtual column in a foreign key would be to enforce &#8220;generic foreign keys&#8221; &#8211; for example to the well known Oracle Designer CG_REF_CODES table.</p>
<p>create table CG_REF_CODES<br />
( DOMAIN varchar2(20) not null<br />
, LOW_VALUE    varchar2(30) not null<br />
, DESCRIPTION varchar2(100)<br />
, &#8230;<br />
);</p>
<p>For each referencing column we can define a virtual column that will be a constant (containing the value to match to CG_REF_CODES.DOMAIN).</p>
<p>So now we should be able to create a valid foreign key and not be concerned that there may be multiple rows in CG_REF_CODES with the same VALUE but different DOMAIN.</p>
<p>(Sorry, can&#8217;t test this out as I don&#8217;t have 11g installed on the laptop)</p>
<p>Regards Nigel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucas Jellema</title>
		<link>http://technology.amis.nl/2008/07/15/referential-integrity-with-virtual-columns/#comment-5405</link>
		<dc:creator>Lucas Jellema</dc:creator>
		<pubDate>Tue, 15 Jul 2008 14:32:37 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=3322#comment-5405</guid>
		<description><![CDATA[Could a Foreign Key also link &lt;i&gt;to&lt;/i&gt; a Virtual Column (on which a Unique constraint is based)? That would allow the creation of Foreign Keys from say  INSURANCE_POLICY explicitly to CAR when the CAR records are in a more general table that contains VEHICLES (or MEANS_OF_TRANSPORTATION). &lt;br /&gt;&lt;br /&gt;regards, Lucas]]></description>
		<content:encoded><![CDATA[<p>Could a Foreign Key also link <i>to</i> a Virtual Column (on which a Unique constraint is based)? That would allow the creation of Foreign Keys from say  INSURANCE_POLICY explicitly to CAR when the CAR records are in a more general table that contains VEHICLES (or MEANS_OF_TRANSPORTATION). </p>
<p>regards, Lucas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Nuijten</title>
		<link>http://technology.amis.nl/2008/07/15/referential-integrity-with-virtual-columns/#comment-5404</link>
		<dc:creator>Alex Nuijten</dc:creator>
		<pubDate>Tue, 15 Jul 2008 12:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=3322#comment-5404</guid>
		<description><![CDATA[Maybe I misheard him, but I&#039;m pretty sure he said something along these lines.]]></description>
		<content:encoded><![CDATA[<p>Maybe I misheard him, but I&#8217;m pretty sure he said something along these lines.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Boekelaar</title>
		<link>http://technology.amis.nl/2008/07/15/referential-integrity-with-virtual-columns/#comment-5403</link>
		<dc:creator>Peter Boekelaar</dc:creator>
		<pubDate>Tue, 15 Jul 2008 12:21:37 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=3322#comment-5403</guid>
		<description><![CDATA[Hi Alex,

First of all, interesting stuff, as always.
You already wrote that the example was a bit dodgy, but could you give an example where you should/could actually use a foreign key created on a virtual column? Isn&#039;t it a bit dangerous to make a referenence using concatenated (or changed in any matter) data?
A constraint like a unique key would be more applicable on a virtual column than a referential key...]]></description>
		<content:encoded><![CDATA[<p>Hi Alex,</p>
<p>First of all, interesting stuff, as always.<br />
You already wrote that the example was a bit dodgy, but could you give an example where you should/could actually use a foreign key created on a virtual column? Isn&#8217;t it a bit dangerous to make a referenence using concatenated (or changed in any matter) data?<br />
A constraint like a unique key would be more applicable on a virtual column than a referential key&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco Gralike</title>
		<link>http://technology.amis.nl/2008/07/15/referential-integrity-with-virtual-columns/#comment-5402</link>
		<dc:creator>Marco Gralike</dc:creator>
		<pubDate>Tue, 15 Jul 2008 12:13:29 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=3322#comment-5402</guid>
		<description><![CDATA[Sound premature...&quot;He started by saying the Oracle 11g Release 2 can be expected the end of this calender year. &quot;]]></description>
		<content:encoded><![CDATA[<p>Sound premature&#8230;&#8221;He started by saying the Oracle 11g Release 2 can be expected the end of this calender year. &#8220;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
