Erik Meier kinda compares LINQ to SQL to Entity Framework

I just came across this interview on the INFO-Q website. I like how they do this. Short questions and answers. Each q/a has a video clip, where you can watch and listen to the subject of the interview and simultaneously read the text of the question and answer. That makes it really easy for me to paste these two tidbits.

Basiically he says LINQ to SQL is for simple database scenarios and EDM (Entity Data Model) is for very complex schemas and giant databases. Not earthshatteringly different than what are figuring out, but interesting to hear it from the guy who is credited for inventing LINQ. He’s NOT comparing it to Entity Framework, since there’s more to Entity Framework than the EDM that lies at it’s core. Here is a post about Mike Pizzo comparing LINQ to SQL and Entity Framework directly.

What about DLINQ (aka LINQ to SQL)? 
DLINQ is and instance of LINQ over Relational Data, which is trying to address the simpler mapping scenarios. In DLINQ there are several ways to do this. You can point at your database and get your classes from the metadata and the database, you can put custom attributes on your classes, and define your mapping like that or you can use an external mapping file. DLINQ, like many other object relation mappings, has this notion of context, which is the bridge between the object world and the database world, that does the change tracking and holds the database context, and the transaction context and so on. Also this context will take your expression trees, translate them to SQL and then materialize your objects. DLINQ is one example of using LINQ to query against Relational Data.

Can you relate EDM into this discussion?
Yes, the EDM is designed for situations where you have really complicated schemas and giant databases, where your mapping scenarios are much more complex, where you want to do de-normalization, and where you want to map different tables to a single type or you want to have one table mapped to different types, or you have complicated implementations of inheritance. These are situations where you have really complicated enterprise applications, legacy applications, where simple direct one to one mapping doesn’t fit.
 
Also interesting to hear him talk about what he’s working now.

  Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!  

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.