My first Publication Agile-Data-Warehouse-Design-eBook | Page 102
Modeling Business Dimensions
81
“moment-in-time” questions and temporarily marking up the hierarchy chart with
the cardinality results. Starting with the parent relationship, ask:
Can a [Candidate] belong to more than one [Parent]
(at one moment in time)?
If the answer is YES put “M” just below the parent.
If the answer is NO put a “1” just below the parent.
Can a [Parent] have more than one [Candidate]?
If the answer is YES put “M” just above the candidate.
If the answer is NO put “1” just above the candidate.
For example, to test that SUBCATEGORY belongs below CATEGORY ask:
Can a SUBCATEGORY belong to more than one CATEGORY?
then:
Can a CATEGORY have more than one SUBCATEGORY?
If you finish with “M” above the candidate (SUBCATEGORY) and “1” below the
parent (CATEGORY) (NO, YES answers) as in Figure 3-14 then you have the M:1
relationship you are looking for and the candidate belongs in the hierarchy below
the parent. If the child below the new level is the dimension itself then the candi-
date is in the correct position (you already know that the new level has a 1:M
relationship with the dimension). Otherwise you test that the child relationship is
1:M by asking a few more quick fire questions while pointing at the hierarchy chart
(pointing always helps):
Can a [Candidate] have more than one [child]?
If the answer is YES then put “M” just above the child.
If the answer is NO put “1” just above the child.
Can a [child] belong to more than one [Candidate]?
If the answer is YES put “M’ just below the candidate.
If the answer is NO put a “1” just below the candidate.
If a new level is M:1
with its parent,
check that it is 1:M
with its child