Partager via


Microsoft’s Data Access Strategy

Over the last 12 months, Microsoft has been talking a lot about two major innovations related to representing and querying data. The first is the new Entity Data Model exposed as part of the ADO.NET Entity Framework, and the second is a set of extensions to the .NET Framework for integrating queries into the programming language known as LINQ. What are these technologies, how do they relate to one another, and what role do they play in Microsoft’s Data Access Strategy? Let’s start with Microsoft’s Data Access Strategy.

Does Microsoft have a Data Access Strategy?

Yes, it turns out we do. Microsoft envisions an Entity Data Platform that enables customers to define a common Entity Data Model across data services and applications. The Entity Data Platform is a multi-release vision, with future versions of reporting tools, replication, data definition, security, etc. all being built around a common Entity Data Model.

Within the .NET Framework, the ADO.NET Entity Framework is integral to this vision. The ADO.NET Entity Framework builds on our mutual investment in ADO.NET by enabling applications to write to a conceptual data model with strong notions of type, inheritance, and relationships. Through the use of “Client Views”, this conceptual model can be flexibly mapped to existing relational schemas, enabling the creation of new business structures when the underlying database schema cannot be changed and providing a level of indirection that helps isolate applications from naming as well as structural changes of the storage schema (for example, changes in the degree of storage schema normalization). The ability to work with a conceptual model greatly simplifies forms design and web service development where the underlying data store represents the model in a complex way.

Client Views are implemented within a new ADO.NET Data Provider called the Entity Client which supports an extended SQL grammar called Entity SQL (“ESQL”). ESQL provides a common query language across providers by extending the existing SQL language with constructs to work with strong notions of type, inheritance, and relationships from the Entity Data Model. By exposing the conceptual model through traditional ADO.NET Data Provider APIs (Connections, Commands, and Data Readers), existing ADO.NET programmers can immediately benefit from the conceptual model, common SQL language, and flexible mapping of the ADO.NET Entity Framework.

The ADO.NET Entity Framework also supports Object Services for building typed queries and returning, manipulating, and updating results as Business Objects. These Business Objects can be queried using ESQL, or through a new language innovation called LINQ.

What is LINQ?

Microsoft’s new Language Integrated Query (LINQ) is a set of extensions to the .NET Framework that provide common capabilities within the programming language for querying against in-memory data as well as external data sources. LINQ complements our vision for an Entity Data Platform by providing language extensions for querying data as objects within the programming language.

LINQ will ship as part of the next version of Visual Studio and the .NET Framework, codenamed Orcas. At the time that Orcas first ships, the .NET Framework will include support for LINQ over in-memory objects, LINQ over XML (XLINQ), LINQ over ADO.NET DataSets (LINQ to DataSet), and LINQ queries directly mapped to Microsoft SQL Server schemas (LINQ to SQL).

A few months after the shipment of Orcas, and within the first half of 2008, Microsoft will release the ADO.NET Entity Framework as an extension to the Orcas version of the .NET Framework. The ADO.NET Entity Framework will fully support LINQ through a feature known as “LINQ to Entities”. LINQ to Entities combines the developer experience of having query integrated into the programming language and the richness of being able to define an Entity Data Model with flexible mapping to relational stores.

What is the difference between LINQ to SQL and LINQ to Entities?

LINQ to SQL supports rapid development of applications that query Microsoft SQL Server databases using objects that map directly to SQL Server schemas. LINQ to Entities supports more flexible mapping of objects to Microsoft SQL Server and other relational databases through extended ADO.NET Data Providers.

If you are writing an application that requires any of the following features, you should use the ADO.NET Entity Framework:

· The ability to define more flexible mapping to existing relational schema, for example:

o Mapping a single class to multiple tables

o Mapping to different types of inheritance

o Directly Modeling Many to Many relationships

o Mapping to an arbitrary query against the store

· The ability to query relational stores other than the Microsoft SQL Server family of products.

· The ability to share a model across Replication, Reporting Services, BI, Integration Services, etc.

· A full textual query language

· The ability to query a conceptual model without materializing results as objects

If you do not require any of these features, LINQ to SQL may provide a simpler solution for rapid development. LINQ to SQL is targeted at rapid-development scenarios against Microsoft SQL Server and provides a simpler approach and richer design experience in the Orcas timeframe for applications with data classes that map directly to the schema of your Microsoft SQL Server database.

Microsoft is defining a migration plan for customers that start with LINQ to SQL and require additional functionality, such as richer mapping capabilities or access to other stores, to migrate to the ADO.NET Entity Framework.

Sounds great; how do I get started?

Both LINQ to SQL and the ADO.NET Entity Framework, including LINQ to Entities, are available now as part of the Orcas Beta 1. LINQ over Objects, LINQ to XML, LINQ to SQL, and LINQ to DataSet will all ship as part of the Orcas release of the .NET Framework. We will continue to ship CTPs and Betas of the ADO.NET Entity Framework that align with Orcas throughout the remainder of this year.

Mike Pizzo,
Architect, Data Programmability

Comments

  • Anonymous
    April 28, 2007
    Again, you post a loooong blog article that clearly breaks the news that the entity framework is cut from Orcas. And yet, where is it written in the post? You attempt to hide that news in lots of talk about strategy and then mention in a half sentence that ADO.NET Entity Framework will ship as an add on in 2008. Not ONE sentence in the whole piece that the news that made you write this article is that the feature is cut from Orcas. This hopeless attempt to spin the story reminds me all over about WinFS. There were lots of time shifts with WinFS. Every single one was painted as "strategic", and all the blog articles attempted to paint a rosy picture about these shifts. Why do you try that?!? I am just lost, just put up an honest blog article saying "Sorry, we couldn't finish the UI for the entity mapping, therefore ADO.NET Entity Framework is cut from Orcas. We are not happy about that ourselve, but that is how things go." That would SOOO much better resonate with us out here and would not bring back these images of a group trying to paint a pritty picture when in reality their schedule was falling apart. Trying to spin gives outsiders the impression that there is more bad news than what is really anounced. In this case, I get the impression that there is more bad news than the not-finishing-of-the-mapping-UI that you actually anounced today, given the track record of the WinFS anouncements.

  • Anonymous
    April 29, 2007
    ADO.NET Entity Framework UpdateRight on the heals of the .NET Framework 3.5 Beta 1 release comes...

  • Anonymous
    April 29, 2007
    Or better yet. just state that Entity spaces ship vehicle has changed from Orcas to Katmai. Douglas

  • Anonymous
    April 29, 2007
    Microsoft has just announced that the ADO.NET Entity Framework will not be shipped with Orcas (Visual

  • Anonymous
    April 29, 2007
    Microsoft has just announced that the ADO.NET Entity Framework will not be shipped with Orcas (Visual

  • Anonymous
    April 29, 2007
    Today the ADO.NET team announced that the ADO.NET Entity Framework will not ship with Visual Studio Orcas

  • Anonymous
    April 29, 2007
    Now that you've got some time until the official release, any chance that you can better support the Domain Model pattern (http://udidahan.weblogs.us/2007/04/21/domain-model-pattern/) without requiring us to do our own change-tracking, etc?

  • Anonymous
    April 29, 2007
    The comment has been removed

  • Anonymous
    April 29, 2007
    Così si dice ... TheEntityFramework® non sarà riasciato con Orcas. Il titolo di questo post è volutamente

  • Anonymous
    April 29, 2007
    If you are interested in the Entity Data Model and want to know more about Microsoft's Data Access

  • Anonymous
    April 29, 2007
    There's an announcement over on the Data Access Team's blog about the ADO.NET Entity Framework. In a...

  • Anonymous
    April 29, 2007
    So this appears to confirm the expected but not widely stated assumption that Orcas will ship in late 2007 as "A few months after the shipment of Orcas, and within the first half of 2008, Microsoft will release the ADO.NET Entity Framework as an extension to the Orcas version of the .NET Framework."

  • Anonymous
    April 30, 2007
    I am the chief cook and bottler washer at my company.  I really don’t care who takes credit for what. I am interested only in how to best make money and provide the best product I can. Furthermore I don’t care about what other companies are doing because we are a Microsoft only house.  That said, I need to know NOW the coupling (if any is or is planned) between eSQL, Linq, and WCF/SOA.  I have not seen a word where these technologies espoused by Microsoft/Windows and Microsoft/SQL Server mesh.  Will they? Do they?  Please some one at least comment how Linq/eSQL is going to reach across the great WCF divide to understand database hidden on the other side. If that is not possible then eSQL seems to be a waste of my time. Even eSQL is woven into VS 200X I see little advantage because I am still having to build all the coupling in the backend.  Where is the gain? This is not a rant it is a real request for some simple guidance. Right now our company has a code generator built on the Enterprise Library that models our databases and generates the classes on both sides of WCF all the way up to some specialized custom controls.  We are looking at the next version being a WPF/WCF model and trying to lessen the cost of maintenance/new product development. So where is the gain? Make some sense of all this. Larry Aultman

  • Anonymous
    April 30, 2007
    I have faithfully followed Microsofts efforts to tackle the ORM problem for quit some time now (downloaded the original ObjectSpaces "beta"). This is a very importantexpensive problem for your customers. I have never seen a company falter so badly in one area as you guys have. I will certainly hear from folks within my own company bringing this up as I've been preaching for folks to wait for Orcas on some of our data related arch decisions. After ObjectSpaces, WinFS, dropping Linq from VS 2005, and now this...Let's just say that you guys are losing alot of creditability with alot of folks in the industry who have supported you for a while. Sorry, no other way to put this.

  • Anonymous
    April 30, 2007
    @ dumbfounded: if you wait for Orcas to use O/R mapping, I don't understand you. There are several mature O/R mappers out there for .NET for quite some time now, systems which can give you the benefits TODAY, without waiting yet another year. But of course, it's your time and money :)

  • Anonymous
    May 01, 2007
    Frans,   I think you have something there. Sometimes it's hard to get your company to deviate from what comes out of the MSDN subscription. Mine is a bit reluctant to buy into yet another vendor. We're starting to discuss the possibility now though. Travis

  • Anonymous
    May 01, 2007
    BEA Aqualogic Data Services Platform has already all of these 'Universal Data Access' features.  I think Microsoft is still lagging behind BEA at least couple of years in this area.

  • Anonymous
    May 01, 2007
    Frans is right. There are many mature products on the market today and MS would be better off purchasing or licensing such a product to get in the game.

  • Anonymous
    May 01, 2007
    I agree with Udi Dahan, its vital that we can apply the domain model pattern.

  • Anonymous
    May 02, 2007
    Microsoft's "data strategy" has been nothing than a big joke for many years now... or... wait! It has been more than a joke, I must admit - it's been an antipattern.

  • Anonymous
    May 02, 2007
    Dumbfounded, Frans is obviously too polite (or modest) to say, but he has a solution that is well worth spending some of your time reviewing (http://www.llblgen.com/defaultgeneric.aspx).  There is a demo at that page, and it has very wide support for various DB vendors. Don't wait for Microsoft to give you half of what others are offering today. There should be a definite business case for buying something that will make you more productive today rather than in 12 months time. Better still it isn't really even that expensive .... -Ross.

  • Anonymous
    May 03, 2007
    what a pity for you .net developer and microsoft follower  i have been doing for years till  i realize that i am loosing my time and money on the microsft platform. come to the java world you will get them all now for free.  stop paying so  much MS$. you will see they will take you seriously

  • Anonymous
    May 03, 2007
    2007年2月28日,Microsoft 負責資料處理技術之架構師 Mike Pizzo 於他的 blog 中透露了目前 ADO.NET Entity Framework 最新現況。Mike Pizzo

  • Anonymous
    May 06, 2007
    The comment has been removed

  • Anonymous
    May 07, 2007
    What's the difference between LINQ and Jasper? They're more or less the same, aren't they?

  • Anonymous
    May 11, 2007
    Microsoft decided to launch ADO.NET Entity Framework and Tools during the first half of 2008 as an update

  • Anonymous
    May 19, 2007
    Where are the Microsoft fanboys?

  • Anonymous
    May 22, 2007
    Strategy? or Anti-strategy...!! What does it means, anyway? I know that strategy give you some kind of differentation from rest of us, but in this case. I don't think so! May be, Michael Potter, give you some hand! ;-) Anyway, for me,  The really Microsoft’s Data Access Strategy  will be integrated framework that are in the internet, inside of .net CLR (Nhibernate, ibatis .net, etc) and, that, it's really powerful. This strategy, work like some kind of extension of .net framework. Why Not? Think about it? Imagine, any Data Access Framework that implements, some interfaces of .net framework could integrated with  .net. Thinks like .net provider but with the eyes of Data Access. Orlando Agostinho Lisbon/Portugal

  • Anonymous
    May 29, 2007
    I have a feature request for LINQ to Entities. Please add composability of ObjectQuery upon ObjectQuery, just like IQueryable upon IQueryable. I need to be able to extend the final query (that goes to the database) using LINQ to Entities. Following is an example of what I'm talking about. If I have the following tables:  Orders and OrderDetails I can define a LINQ to SQL query like this  var qry = from r1 in db.Orders            from r2 in db.OrderDetails            where r1.orderid == r2.orderid            select r1.orderid; But also can define the following extension query in a partial class that has the same name as the DataContext. This way this new method becomes an extension to the model and looks just as natural as the other tables with the exception that is a method and not a property:  public partial class Northwind  {    public IQueryable<Orders> ValidOrders( System.DateTime pFrom, System.DateTime pThrough )    {       return from row in this.Orders              where orderdate >= pFrom              && orderdate <= pThrough              select row;    }  } and I can use it as a table in a query:  var qry = from r1 in db.ValidOrders( DateTime.Parse("1/1/2006"), DateTime.Parse("12/31/2006") )            from r2 in db.OrderDetails            where r1.orderid == r2.orderid            select r1.orderid; I can NOT do that with Entities and I really think this is necessary to create tables that enforce business logic and simplify programming like Views, but that are not subjected to the same restrictions (i.e. View of a join of multiple tables that accepts INSERT).

  • Anonymous
    July 19, 2007
    2007年4月28日,Microsoft 負責資料處理技術之架構師 Mike Pizzo 於他的 blog 中透露了目前 ADO.NET Entity Framework 最新現況。Mike Pizzo

  • Anonymous
    July 26, 2007
    I just reviewed the questions log from the webcast. It appears that some of the questions that were in

  • Anonymous
    September 06, 2007
    I'm interested to know more about the migration plan mentioned in this paragraph: Microsoft is defining a migration plan for customers that start with LINQ to SQL and require additional functionality, such as richer mapping capabilities or access to other stores, to migrate to the ADO.NET Entity Framework. Where can I find more information about it?  

  • Anonymous
    October 02, 2007
    SQL Server 2008 is at the door and the same stands for Visual Studio 2008. The data access strategy is

  • Anonymous
    October 24, 2007
    И так до конца февраля (намеченная дата релиза) мы планируем сделать следующее:

  • Anonymous
    November 04, 2007
    At TechED, I promised to post a set of resources at my LINQ session. This post is a bit overdue due to

  • Anonymous
    November 07, 2007
    Mike, I really appreciate your post and honestity. Also, it clarified me as I was confused between Linq to Sql and Entity Framework. I also appreciate if you have some link which shows what you are saying in a comparison chart. Also, I appreciate if you could confirm when Entity Framework will be released as well as the tools for VS 2008. I also understand that it will support Sql2008, wont it? thanks Pablo.

  • Anonymous
    January 10, 2008
    The comment has been removed

  • Anonymous
    January 31, 2008
    Microsoft has dropped the Entity Framework , which includes LINQ for Entities, from the .NET 3.5 and

  • Anonymous
    May 17, 2008
    These days I&#39;m so concerned about ADO.NET Entity Framework and ADO.NET Data Services (Project Astoria

  • Anonymous
    June 16, 2008
    We Need "CHANGE WE CAN BELIEVE IN".

  • Anonymous
    July 01, 2008
    Concurrently with the finalization of the initial LINQ release bits, community previews of complementary

  • Anonymous
    July 02, 2008
    While I have finished my series on LINQ to SQL I wanted to talk about some of the reaction. In his summary

  • Anonymous
    July 02, 2008
    While I have finished my series on LINQ to SQL I wanted to talk about some of the reaction. In his summary

  • Anonymous
    July 13, 2008
    Are we "within the first half of 2008" yet?   In which "first half of 2008" will the Entity Framework be released?

  • Anonymous
    August 16, 2008
    Just read "the petition".  I thought I was confused before in which direction to turn for data access in my n-layer apps, now the EF appears to have a pretty negative light on it. What's Microsoft's standpoint on this?  I haven't found a response to this petition.

  • Anonymous
    January 09, 2009
    Is MS Strategic vision are so dependent on customers? Though I am sure it might give a lot benefits to customers but what about developers? Don't you guys think that you are making a developer's life more miserable by coming up with new framework revision every six months or so and some new buzzwords like LINQ and ADO.NET Entiti Framework? What are your take on this? Huh, like I had made the biggest mistake of my life by choosing Microsoft Platform. Now unfortunately MS didn't left any option for me other than saying that Java is far more superior, simpler and sustainable platform than MS.NET Framework. At least it is much much more stable than .NET Framework.

  • Anonymous
    January 13, 2009
    Software development is a very young field and evolution is part of this. Things change quickly and improvements are being made everyday. If you can't understand this, you can't be a successful developer. Java is write once and debug everywhere. Horribly Slow. Has no development environment that matches Visual Studio.

  • Anonymous
    January 25, 2009
    Lately I have been hearing some junior developers saying “LINQ to SQL is gone and ADO.NET Entity Framework

  • Anonymous
    July 13, 2009
    Thanks for the post. it clearly explains the need of using Enity Framework !