Database Reference
In-Depth Information
Each line on this sketch represents a business rule in the form of a relationship between two
concepts, so Customer and Account have a relationship, Check and Check Debit have a
relationship, etc.
Once we've identified the fact that two entities have a relationship, we need to articulate
what that relationship looks like and make it precise. To make it precise, we need to de-
termine whether each entity in a relationship has a one or many participation with its re-
lated entity as well as whether each entity is required or optional in the relationship. We
need to know participation and optionality for both entities in a relationship, leading to four
questions to ask for each relationship.
If there is a relationship between Entity A and Entity B , here are the two participation
questions I would ask:
Can an Entity A be related to more than one Entity B ?
Can an Entity B be related to more than one Entity A ?
And here are the two optionality questions I would ask:
Can an Entity A exist without an Entity B ?
Can an Entity B exist without an Entity A ?
In addition, we can also identify where we might add subtypes. Recall from Chapter 3 that
subtyping groups the common properties of entities, while retaining what is special with-
in each entity. Subtyping is an excellent way of communicating an entity lifecycle or for
showing examples. For each entity, ask these two questions to determine whether subtypes
should be added to the model:
Are there examples of this entity that would be valuable to show on the model,
either for communication purposes or to enforce certain rules?
Does this entity go through a lifecycle?
So for each relationship line on our model, we find ourselves asking up to eight questions:
two on participation, two on optionality, and up to four questions on subtyping. For the
model we just sketched, we can create a question template to make it easy to select “Yes”
or “No” for the answer to each of these questions:
Search WWH ::




Custom Search