Entity Data Model in .NET

Entity Data Model in .NET

Microsoft has introduced a new framework model termed as ADO.NET Entity Framework for Data Access Layers based on ORM (Object Relational Mapping) model in which each and every table in the database is treated as a separate entity and the relationship between these entities are defined in a separate XML mapping file (Entity Data Model). By this, it has now become possible to represent a relational model as a conceptual data model that includes types with inheritance and relationship. This is yet another conceptual revolution towards abstract programming model by which we can maintain a language-independent entity model.

Developers can now create their business applications by just writing the business logic in terms of the conceptual domain model described via object relational mapping irrespective of the logical schema of the underlying data store.

In an Entity Data Model (EDM), the entities correspond to the table in the data store that maintains the persistence of the data. Say an employee table whose Entity Type would be of Employee Class, with the properties set to the fields in the employee table, and the instance of the Entity Type matching with the corresponding tuples in the table. These entity types can be related to each other independent of the physical scheme of the data store. If the underlying data store makes any changes in its scheme, vis-a-vis, the changes can be implemented in the application only by changing the XML mapping file without affecting our business logic code layer.

It is noteworthy that ADO.NET Entity Framework uses a variant of SQL termed as Entity SQL which is aimed at writing queries to the data store at the more conceptual level in terms of the Entity Types created on the application front. ADO.NET Entity Framework takes care the problem of translating the entity SQL command tree into native SQL query of the corresponding database. Even though, in future, the data store schema or its location be changed the changes can be configured in the EDM XML file without affecting our application-specific business logic. Visit our Custom .NET Application Services

, , , ,

Share this post