views:

22

answers:

1

Hi

I am reading the Entity Framework 4.0 recipe. In chapter 2, it has a bunch of recipes for modeling our entities relationship ( Table per Type, one to many, ...) basing on the relationship table. My question is that EF will automatically create models to match our database tables relationship already. So why do we need to remodel our entity models again even though that won't change our database scheme and tables?

Note: I am using an existing database scheme and don't want to change any relationship from the database.

A: 

Well that's is the whole idea of Entity Framework that a conceptual model is how we portray or perceive the business looks like. However the data is stored usually in 2nd or 3rd normal form to make efficient use of disk space and also improve the efficiency of data retrieval. To make both worlds happy, we consume the best of both worlds and apply modeling on top of it mask the conceptual model into the storage model. If you business model is exactly similar to how you store your data in the database, then you do not need to remodel it.

zeeshanhirani
thank you a lot. That answers my question.
Tai