<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Foreign Keys in the Conceptual and Object Models</title><link>http://blogs.msdn.com/b/efdesign/archive/2008/10/27/foreign-keys-in-the-conceptual-and-object-models.aspx</link><description>If you are reading this, you have probably heard by now about the so called impedance mismatch between the relational world and the object world – and there are a number of concepts in the relational database that don’t translate easily to corresponding</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Foreign Keys in the Conceptual and Object Models</title><link>http://blogs.msdn.com/b/efdesign/archive/2008/10/27/foreign-keys-in-the-conceptual-and-object-models.aspx#10105577</link><pubDate>Wed, 15 Dec 2010 22:39:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10105577</guid><dc:creator>AG</dc:creator><description>&lt;p&gt;I agree that FK&amp;#39;s would have to be in the EF for performance reasons.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10105577" width="1" height="1"&gt;</description></item><item><title>re: Foreign Keys in the Conceptual and Object Models</title><link>http://blogs.msdn.com/b/efdesign/archive/2008/10/27/foreign-keys-in-the-conceptual-and-object-models.aspx#9799456</link><pubDate>Tue, 23 Jun 2009 16:37:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9799456</guid><dc:creator>Aaron</dc:creator><description>&lt;p&gt;I just want the ability to handle lookup tables. &amp;nbsp;I don't care if you put foreign keys in the model so long as I can map an object to a foreign key. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;For example, if I have a Customers table and a CustomerTypes table, I want the conceptual Customers object to have a CustomerType string that can be linked to the Description on the CustomerTypes table. &amp;nbsp;This mapping should use the foreign key constraint to make sure that only valid CustomerType strings can be set.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9799456" width="1" height="1"&gt;</description></item><item><title>re: Foreign Keys in the Conceptual and Object Models</title><link>http://blogs.msdn.com/b/efdesign/archive/2008/10/27/foreign-keys-in-the-conceptual-and-object-models.aspx#9724387</link><pubDate>Wed, 10 Jun 2009 18:16:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9724387</guid><dc:creator>John</dc:creator><description>&lt;p&gt;I think FKs should be exposed and read/write. Linq to SQL had a reasonable approach. By not including it, it's true that you're enforcing the object-relational approach, but you're taking away an option for developers.&lt;/p&gt;
&lt;p&gt;If it's that big of a deal, why not include the option to enable or disable FKs?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9724387" width="1" height="1"&gt;</description></item><item><title>re: Foreign Keys in the Conceptual and Object Models</title><link>http://blogs.msdn.com/b/efdesign/archive/2008/10/27/foreign-keys-in-the-conceptual-and-object-models.aspx#9701176</link><pubDate>Fri, 05 Jun 2009 14:15:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9701176</guid><dc:creator>Jose Goncalves</dc:creator><description>&lt;p&gt;KISS. Dont expose foreign keys in the Model because it is unnecessary and wrong. Dont take the kitchen sink approach please. There are other ways/alternatives &amp;nbsp;to mess in with foreign keys if you really need to.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9701176" width="1" height="1"&gt;</description></item><item><title>Foreign Keys in the Entity Framework</title><link>http://blogs.msdn.com/b/efdesign/archive/2008/10/27/foreign-keys-in-the-conceptual-and-object-models.aspx#9698577</link><pubDate>Thu, 04 Jun 2009 09:51:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9698577</guid><dc:creator>VS2010学习</dc:creator><description>&lt;p&gt;Background A number of months ago we asked whether Foreign Keys (FKs) in Conceptual and Object models&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9698577" width="1" height="1"&gt;</description></item><item><title>Better N-Tier Concurrency Management for the Entity Framework(Sum)</title><link>http://blogs.msdn.com/b/efdesign/archive/2008/10/27/foreign-keys-in-the-conceptual-and-object-models.aspx#9665922</link><pubDate>Sat, 30 May 2009 20:14:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9665922</guid><dc:creator>Web开发技术</dc:creator><description>&lt;p&gt;Better N-Tier Concurrency Management for the Entity Framework Posted in Technical at 11:03 am by Tony&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9665922" width="1" height="1"&gt;</description></item><item><title>re: Foreign Keys in the Conceptual and Object Models</title><link>http://blogs.msdn.com/b/efdesign/archive/2008/10/27/foreign-keys-in-the-conceptual-and-object-models.aspx#9631589</link><pubDate>Wed, 20 May 2009 08:52:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9631589</guid><dc:creator>Theo Koekemoer</dc:creator><description>&lt;p&gt;Please allow FKs as both read-only and Setting the Values. Will make Life much better.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9631589" width="1" height="1"&gt;</description></item><item><title>re: Foreign Keys in the Conceptual and Object Models</title><link>http://blogs.msdn.com/b/efdesign/archive/2008/10/27/foreign-keys-in-the-conceptual-and-object-models.aspx#9626399</link><pubDate>Tue, 19 May 2009 02:32:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9626399</guid><dc:creator>Terry</dc:creator><description>&lt;p&gt;I would favor FKs as read-only properties. This avoid the &amp;quot;2 independent references to the same entity&amp;quot; issue while allowing some performance improvement when it is only necessary to reference the FK and not the whole entity. &amp;nbsp;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9626399" width="1" height="1"&gt;</description></item><item><title>re: Foreign Keys in the Conceptual and Object Models</title><link>http://blogs.msdn.com/b/efdesign/archive/2008/10/27/foreign-keys-in-the-conceptual-and-object-models.aspx#9537123</link><pubDate>Wed, 08 Apr 2009 03:47:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9537123</guid><dc:creator>Rick O'Shay</dc:creator><description>&lt;p&gt;Everybody agrees the foreign key is unnecessary so the question boils down to convenience. The key is available through the object reference, so the argument about it being convenient is weak. &lt;/p&gt;
&lt;p&gt;There are more downsides than you have listed. if you have two key values, which one does the data context believe? What happens when the related table uses a composite key? &lt;/p&gt;
&lt;p&gt;Finally, it's this a mapping issue? Presumably we can map as many or as few columns as we want, however we want, so why not default to generating necessary values only (read: NOT adding both a reference and a redundant foreign key). &lt;/p&gt;
&lt;p&gt;Finally, and this time I mean it, Hibernate and related technology have been using object reference only for almost a decade and nobody has complained. It's the right approach practically and theoretically &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9537123" width="1" height="1"&gt;</description></item><item><title>re: Foreign Keys in the Conceptual and Object Models</title><link>http://blogs.msdn.com/b/efdesign/archive/2008/10/27/foreign-keys-in-the-conceptual-and-object-models.aspx#9508138</link><pubDate>Wed, 25 Mar 2009 22:17:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9508138</guid><dc:creator>Jeroen Bernsen</dc:creator><description>&lt;p&gt;I understand this feature is part of the impedance mismatch problem, but we really need this feature in some cases. E.g. in a web scenario a lot of times we have the ID value for the foreign key relationship but we don't want to fetch the object again, in these cases we would just want to set the foreign key property. Also in some N-Tier scenario's it can be very useful for us.&lt;/p&gt;
&lt;p&gt;Thanks, Jeroen&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9508138" width="1" height="1"&gt;</description></item></channel></rss>