Dave
Dave

Reputation: 68

TPH for Reporting

We are using EF Core with TPH (table-per-hierarchy) with VS 2017 and SQL Server 2016.

Just wanted to solicit some advice in terms of what people are doing to report off a TPH database. Normally, databases are denormalized for reporting purposes. Should a TPH database be handled any differently? Any special precautions to take?

Upvotes: 1

Views: 65

Answers (1)

David Browne - Microsoft
David Browne - Microsoft

Reputation: 89361

TPH is the least normalized of the inheritance mapping strategies, as the whole inheritance hierarchy shares a single table. It's also, therefore, the simplest for reporting.

You still may want to create views for reporting, both to simplify the report writing, and to de-couple the reports from the underlying table design.

Upvotes: 1

Related Questions