<?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: Surrogates</title>
	<atom:link href="http://blog.roweware.com/2009/12/23/surrogates/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.roweware.com/2009/12/23/surrogates/</link>
	<description>Ramblings about things I think I know...</description>
	<lastBuildDate>Tue, 30 Mar 2010 20:28:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: dave</title>
		<link>http://blog.roweware.com/2009/12/23/surrogates/comment-page-1/#comment-1296</link>
		<dc:creator>dave</dc:creator>
		<pubDate>Wed, 23 Dec 2009 23:15:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.roweware.com/?p=150#comment-1296</guid>
		<description>I would contend (given this example) that tables should not be referencing the user_role table, since that table merely links the user to the role, establishing that the relationship exists.  The parent table should rather link to the role table, and the business logic states that the user is a member of that role.

For instance, if driving a permission from the role, I would code the application to the role, not the user_role.  Though, it is a very valid point in a different situation, and I&#039;d not thought of it that way.</description>
		<content:encoded><![CDATA[<p>I would contend (given this example) that tables should not be referencing the user_role table, since that table merely links the user to the role, establishing that the relationship exists.  The parent table should rather link to the role table, and the business logic states that the user is a member of that role.</p>
<p>For instance, if driving a permission from the role, I would code the application to the role, not the user_role.  Though, it is a very valid point in a different situation, and I&#8217;d not thought of it that way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Tucker</title>
		<link>http://blog.roweware.com/2009/12/23/surrogates/comment-page-1/#comment-1295</link>
		<dc:creator>Jon Tucker</dc:creator>
		<pubDate>Wed, 23 Dec 2009 23:09:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.roweware.com/?p=150#comment-1295</guid>
		<description>I prefer the Candidate Key combination myself.  Reason being is that the Surrogate Key method doesn&#039;t allow the two columns (in the above example: user_id and role_id) to be maintained with referential integrity in the database.  If a parent table has the user_role_id as a child relationship, one can easily modify the user_id and role_id in the user_role table without impacting the parent that is using the user_role table.  The business rule just got wacked and the database stood by helpless.

Now, if you want to code and maintain the database trigger to enforce this relationship, then I maybe willing to go along with it.  : )</description>
		<content:encoded><![CDATA[<p>I prefer the Candidate Key combination myself.  Reason being is that the Surrogate Key method doesn&#8217;t allow the two columns (in the above example: user_id and role_id) to be maintained with referential integrity in the database.  If a parent table has the user_role_id as a child relationship, one can easily modify the user_id and role_id in the user_role table without impacting the parent that is using the user_role table.  The business rule just got wacked and the database stood by helpless.</p>
<p>Now, if you want to code and maintain the database trigger to enforce this relationship, then I maybe willing to go along with it.  : )</p>
]]></content:encoded>
	</item>
</channel>
</rss>
