Introduction of ADO.NET Entity Framework with Examples

By
We have already Learned how to access data from database through the concepts of ADO.NET, SQL and Language Integrated Query(LINQ) from any applications.
Why do we use ADO.NET Entity Framework in Data centric Applications:-
There are following reasons to use ADO.NET Entity Framework in Data centric application generally.There are some advantages and disadvantages as given below.
Suppose ,we want to develop any database for a project first earlier,a conceptual schema has to be designed based on which the logical schema or model is designed to develop a project.we  first had to design a conceptual model on a paper or a whiteboard.This was a time consuming and error-pron process,where the developer had to remember every details of data on which the conceptual model was based.We could not even work with entities in our application in the executable form.


         To overcome these problems ,ADO.NET introduced the concepts of entity framework.The ultimate goal of introducing entity framework in programming is to raise the level of abstraction for data programming and help developers to increase productivity.A ADO.NET entity framework enables developers to show essential features of a logical schema of the data and presents its conceptual schema to the application.In logical schema,the data is stored in the form of tables in a database.The disadvantage of using a logical schema is that very often an application has to use the JOIN clause to retrieve data from tables because it is not always necessary that a logical database always represents the required view of the data for an application.Suppose if you have changed the logical schema ,the application is also affected and needs modification according to the changed schema.
Examples 
select r.emp_name ,e.salary from employee e
INNER JOIN emp_details r on e.emp_id =r.details_id
Where age >= 21

There are some problems that a developer faces while implementing above query.
  • This syntax is more complicated.
  • It consumes more effort and time unnecessarily.
  • To fetch the required information,the application has to deal with both the tables(employee,emp_details).
  • Sometimes ,a logical schema of a database is not capable of using certain part of an application according to the requirement of a developer.In this case ,the application has to deal with the entire logical schema which unnecessary puts additional load on the server.
  • A logical schema is unable understand business entities and their relationship among each other because a relational model can not render the conceptual domain knowledge of the application. 
  • Suppose, an application deals with a subset of data,the developers should be able to indicate the appropriate subject that is required in the application.
These problems are very common across data-centric application.To solve such issues ,ADO.NET has introduced the concepts of entity Framework,which is designed to solve the mismatch between the formats of data.
             ADO.NET Entity Framework consists of data models and provides design-time and run -time services that allow the developers to describe the application data.Suppose,when we use a logical the queries return certain values ,which are not related to the source of data .It shows that there is no common relationship among the elements of a database.ADO.NET Entity Framework Framework allows the developers to describe the application data and isolates the application form. 
 For More...
  1. Learn .NET Interview Questions and Answers with examples
  2. Learn complete Ajax concepts with examples
  3. Learn MVC Concepts with examples
  4. Learn WPF Concepts with examples
  5. Learn Crystal reports with real life examples

0 comments:

Post a Comment

Powered by Blogger.