Databases Reference
In-Depth Information
FIGURE 2.12 Entity type mapped to two separate tables.
Entity Type Inheritance
You can also use class inheritance to model your entities. For example, suppose you need a
conceptual model that supports distinguishing visitors of your website from the actual
customers who have already placed one or more orders. In this model, User entity type
describes all users of an application. Another entity type, Customer, inherits from it and
represents customers, a specialized type of users. Figure 2.13 shows how this model looks
in the entity designer.
FIGURE 2.13 Entity type inheritance.
This conceptual model can be mapped to the same two tables created earlier, Customer
and CustomerAddress. The User entity type is mapped to the Customer table, and the
Customer entity type is mapped to the CustomerAddress table. Here is the mapping defin-
ition in raw XML form:
 
Search WWH ::




Custom Search