Wednesday, May 21, 2008

Entity Framework and ORM

Microsoft is still trying to position the Entity Framework versus more traditional ORM approaches.

Seen this blog entry about this, on this interesting blog from Zlatko Michailov.


  • EF is >> than ORM

  • ORM is basically: Object Model --- --- DB Model

  • EF is: Object Model --- Conceptual Model --- DB Models

The conceptual model is the EDM (Entity Data Model).

What they say is that the "mapping facility" of EF is just the mapping between the object model and the conceptual model, this "OCM" is the equivalent of an ORM. Then you'll find a second mapping layer between the conceptual and the database models.

Understood, but I still need more info, examples, use cases about the real added value of that intermediate level in the case of a relational database. Numerous posts about EF just say it is better to have this intermediate model but they rarely explain why. In one post someone argued that the mapping with the object model is easier because the conceptual model knows concepts like relationships and inheritance. OK, but this just transfer the complex mappings to the other side.

Conversely, I do agree this intermediate level is required when accessing data sources with not enough metadata, like a green screen of a mainframe application for instance. At DataDirect/Xcalia we have an extented metadata language to describe the virtual data model manipulated by a service-oriented data source. We do the mapping between the business (object) model and that intermediate model and we do have a second mapping.

In the case of the EF, the mapping features between the object and conceptual models is quite limited at the moment (1-1 mapping), limiting the potential benefits of that approach.

No comments:

Post a Comment