EF Interitance and DBA Concerns

For a new project, our application developers want to use an Entity Framework type inheritance model for each type.

We recently showed this functionality and the resulting table schema to our database administrator, and he expressed concern, and I wonder how to solve them. Inheritance - an important part of OO, and by the developers would be great to DB and ORM supported this concept initially. This functionality is part of EF, so we don’t like that we pull the design from the left margin.

Its main problems:

  • We do not use stored procedures
  • Increased complexity and simplify the reporting data.

We pretty much looked at his saved problems with proc (and we've been using another ORM for 3 years now).

As for the difficulty, I can see his point, but the counter-point turning to them (for me):

  • Reports should not be run from transactional tables (we are currently doing this); you should use views or a transformed report database.
  • updating data on a more dense structure can spoil the data - is the responsibility of the person who updates the data in order to understand the structure. The scheme used EF type inheritance model for each type, not so complicated, but it must be followed when performing manual updates.

I know that we are not the first to encounter DBA issues regarding inheritance of a DB-enabled model. Like other convinced their DBA, it is a good model?

+4
source share
1 answer

His main problem does not relate to the real problems with TPT.

  • You can use stored procedures with TPT if you want.
  • no more complicated update data. EF cope with them and ensure the correct order of data modification.

The main problem TPT are inefficient queries (also check the comments). TPT at EF has a real problem with productivity, because it makes a lot of left-wing groups and unions, even if he does not need the data from the derived table. Create any reports on this data structure and access to the report through the EF - really bad decision.

Edit:

If his problems associated with other tools to work with your database, then they are completely legitimate, but at the same time it concerns only the correct documentation for your database structure.

+3
source

All Articles