Previous Topic: Defining Entity SubtypesNext Topic: Defining Partitioning


Partitioning

The Entity Subtypes show that the entity type CUSTOMER partitioned into two subtypes along a single partitioning. However, there is no limit to the number of subtypes that can be defined in a partitioning.

Note: For more information, see Entity Subtype and Partitioning.

A subtype can also have partitioning of its own. For example, the subtype FOREIGN CUSTOMER have different relationships and attributes, depending on whether the CUSTOMER resides in a FAVORED NATION country, as shown in the following illustration.

Analysts divide each entity type into multiple partitionings, where each partitioning is a different reason for having subtypes. For example, the list of extended attributes for the entity type CUSTOMER and the integrity constraints that resulted in the first partitioning show the potential for a second partitioning: GOVERNMENT CUSTOMERs have relationships and attributes not shared by COMMERCIAL CUSTOMERs.

Since a GOVERNMENT CUSTOMER can be either A DOMESTIC CUSTOMER or a FOREIGN CUSTOMER (that is, GOVERNMENT CUSTOMERs are not mutually exclusive with DOMESTIC or FOREIGN CUSTOMERs), GOVERNMENT and COMMERCIAL CUSTOMERs are broken down into their own partitioning, as shown in the following illustration.

Subtypes within a partitioning are mutually exclusive with each other but not with subtypes in other partitionings. In this example there are at least four possible permutations for CUSTOMER:

Some situations require cross-partitioning restrictions to accurately reflect the needs of the business. For example, business rules dictate that the company does not deal with FOREIGN, GOVERNMENT CUSTOMERs. Record such a restriction as an integrity constraint of the entity type being partitioned, in this case, in the description of customer.