Database Reference
In-Depth Information
10-6. Populating Entities in a Table per Type Inheritance Model
Problem
You want to use a stored procedure to populate entities in a Table per Type inheritance model.
Solution
Let's say the model looks like the one shown in Figure
10-6
. In this model, the entities Magazine and DVD extend
the base entity Media. In the underlying database, we have a table for each of these entities. We have modeled these
tables using Table per Type inheritance. We want to use a stored procedure to obtain the data for this model from
the database.
Figure 10-6.
A model using Table per Type inheritance. The model represents some information about magazines
and DVDs
■
Need to brush up on table per type modeling and its performance implications? Check out recipe 2-8 in
Chapter 2.
Tip