How ADO.NET vNext bridges the Conceptual Model and the Logical Model.

Posted on 8/16/2006 @ 11:49 AM in #Vanilla .NET by | Feedback | 3227 views

In my last blog post I talked about the basics of the 4 information models any typical software application has to deal with. In this post I will talk about how the next rev of ADO.NET intends to bridge the two.

ADO.NET vNext bridges this gap by using a twofold approach. One part is the EDM (Entity Data Model), and the second is the mapping specification.

The EDM is a diagram that represents your conceptual entities (not logical entities). Thus you have the additional power on top of databases to represent things such as Inheritance.

The second part of the equation is a mapping specification that ties the conceptual EDM to the logical ERD. This mapping specification currently is an XML file. Even though the current CTP doesn’t include this mapping tool, future versions will. So hopefully we will not have to hand-edit XML files. (Yuck).

This brings up another interesting concept called “Client views”. Client views are views of your data, typically represented in the EDM. You can query and work with them directly. This has many advantages.

a) You are working against a view that makes more sense to you and your business need – thus you don’t need to deal with the idiosyncrasies of your underlying logical schema.
b) You don’t need to go bother the two frustrated and sex-deprived DBAs in your shop who guard the database like nasty bloodhounds.
c) Updateable views are not so much fun after all.
d) You can twiddle with the client view, and be absolutely sure that you are affecting only your portion of the world – not everyone else that may be sharing your views.
e) Client views in EDM support concepts that relational views cannot support.
f) And finally .. your client views can be based on Oracle, or SQL Server, or something else going forward. Microsoft will release only SQL Server specific stuff, but Microsoft is working with other companies, including Oracle, to create a parallel infrastructure for other databases as well. This way, you FINALLY have a data layer that is database independent.

Once you are working on these “client views”, it is thus clear that you cannot use TSQL or PL/SQL to query these client views. So you need a new ADO.NET provider, and brand new SQL language.

Well the new provider is called as the Mapping Provider, and the new SQL language is called eSQL, or entity SQL for short. I’ll be talking about that next.

(But before you get alarmed, I heard from a little birdie that querying client views using eSQL uses a really sophisticated querying engine behind the scenes, so yes it is a *lot* more efficient than using string matches).

Sound off but keep it civil:

Older comments..

On 8/17/2006 12:03:04 AM Udi Dahan - The Software Simplist said ..
Updateable views are really a must for handling automatic auditing and version numbers. I wouldn't throw it out of the toolbox just yet :)

On 8/17/2006 10:40:37 AM Sahil Malik said ..
Sorry for being thick but why won't you use triggers for that very purpose?