Database Reference
In-Depth Information
with most design considerations, documenting the specifics can be helpful
in the future for other developers working from this model.
Generally, physical implementation of a subtype cluster must be de-
termined on a case-by-case basis. Subtype clusters can be implemented in
a one-to-one relationship of entities to tables, or some combination of ta-
bles and relationships. The most important aspects to remember are the
propagation of the primary key among all the entities, as well as constraints
on the discriminator to ensure that all the records end up in the correct
tables.
When to Use Subtype Clusters
Inevitably, every data model contains entities that contain attributes that
hold information about a small subset of the records in the entity.
Whenever you find this happening in a data model, investigate further to
see whether these attributes would be good candidates for a subtype clus-
ter. However, be careful not to try to force a supertype/subtype relation-
ship; doing so leads to a confusing data model that has more entities than
necessary. Additionally, the existence of superfluous subtype clusters can
lead to confusion in the physical implementation, often resulting in un-
necessary tables and constraints. This could ultimately lead to poor per-
formance and the inability to maintain the database efficiently.
Subtype clusters can be a very powerful tool to build flexibility into a
data model. Because modeling data in this type of generalized hierarchy
can allow future modifications without the need to change existing entities,
searching for logical relationships where you can use subtype clusters
should be considered time well spent.
Summary
In this chapter, we've covered the tools used to build a logical data model.
Every data model consists of the objects necessary to describe the data
being stored, definitions of how individual pieces of data are related to one
another, and any constraints that exist on that data.
Now that we've covered the building blocks of the logical data model,
Chapter 3 will help you bridge the gap between the logical objects and the
physical implementation. Later you will use this theory to build a data
model for the Mountain View Music company.
 
 
Search WWH ::




Custom Search