Pablo Castro
Microsoft Corporation One Microsoft Way Redmond, WA, 98052, USA pablo.castro@microsoft.com
Sergey Melnik
Microsoft Research One Microsoft Way Redmond, WA, 98052, USA sergey.melnik@microsoft.com
Atul Adya
Microsoft Corporation One Microsoft Way Redmond, WA, 98052, USA adya@microsoft.com
ABSTRACT
The ADO.NET Entity Framework provides a persistence layer for .NET applications that allows developers to work at a higher level of abstraction when interacting with data and data-access interfaces. Developers can model and access their data using a conceptual schema that is mapped to a relational database via a flexible mapping. Interaction with the data can take place using a SQLbased data manipulation language and iterator APIs, or through an object-based domain model in the spirit of object-to-relational mappers. We demonstrate how the Entity Framework simplifies application development using sample scenarios. We illustrate how the data is modeled, queried and presented to the developer. We also show how the provided data programming infrastructure can result in easier-to-understand code by making its intent more explicit, as well as how it can help with maintenance by adding a level of indirection between the logical database schema and the conceptual model that applications operate on. Categories and Subject Descriptors: H.2 [Database Management], D.3 [Programming Languages] General Terms: Algorithms, Management, Design, Languages Keywords: Data Programming, Conceptual Modeling, ADO.NET
support for the language-integrated query (LINQ [5]) mechanism in the upcoming version of C# and Visual Basic. Today, most enterprise data is stored in relational databases. The Entity Framework provides a flexible mechanism for mapping higher-level application models to existing relational schemas. It supports various persistence strategies and helps build new applications on
References: [1] A. Adya, J. A. Blakeley, S. Melnik, S. Muralidhar, and the ADO.NET Team. Anatomy of the ADO.NET Entity Framework. In SIGMOD, 2007 [2] P. A. Bernstein, S. Melnik, J. E. Churchill. Incremental Schema Matching. In VLDB, 2006 [3] J. A. Blakeley, S. Muralidhar, A. Nori. The ADO.NET Entity Framework: Making the Conceptual Level Real. In ER, 2006 [4] W. R. Cook, A. H. Ibrahim. Integrating Programming Languages and Databases: What is the Problem? ODBMS.ORG, Expert Article, Sept. 2006 [5] E. Meijer, B. Beckman, G. M. Bierman. LINQ: Reconciling Objects, Relations and XML in the .NET Framework. In SIGMOD, 2006 [6] S. Melnik, A. Adya, P. A. Bernstein. Compiling Mappings to Bridge Applications and Databases. In SIGMOD, 2007 } } The “VALUE” keyword in the select clause eliminates the rowwrapper that otherwise would be generated by the system if we simply had “o” in the projection list. While this version of the code has identical functionality to the earlier one, the actual code has significantly fewer database-specific constructs; it does not explicitly create and initialize a connection, nor does it need configuration information inside the program. All of this information is captured during code generation and stored in external configuration files. Also, the query results are .NET objects and not rows and columns. 1072