My first Publication Agile-Data-Warehouse-Design-eBook | Page 111

90 Chapter 3 Asking for change groups can help find missed attributes Questions like this, not only expose change dependencies between existing attrib- utes, they can help uncover missed attributes too. They are another one of the BEAM ✲ modeler’s secret weapons for attribute discovery. Discussing the activity of change is another way of adding narrative to an otherwise static dimension and will get stakeholders thinking. They might respond: STREET, ZIP CODE and CITY should all change together. If only one or two of those change, its probably a correction or a move within the same zip or city. If customers move locally — in the same city — we don’t need their old addresses. But if they move city, we will want to use those previous addresses. Use HVn to define a conditional HV group of attributes that must change together You can model a group change rule like this one, very concisely, by using num- bered HV codes to define conditional HV groups: attributes that only act as HV when every member of the same numbered group changes at the same time. In Figure 3-16, the stakeholders’ rule has been documented by marking STREET, ZIP CODE, and CITY as CV, HV1. They are each CV by default (the first temporal short code in the list) so that individual changes will be treated as corrections. Additionally, they are all members of the conditional group HV1 and will act as HV to preserve address history when a customer moves city (when all three attrib- utes change) unless, that is, an exceptional customer manages to move to the very same street address in a different city. Perhaps ZIP CODE and CITY should be in a group of their own (HV3) to safeguard missing this rare type of relocation. Figure 3-16 Modeling a CV change story and group change rules An attribute can belong to multiple HVn groups and be HV by default Notice that the three HV1 attributes in Figure 3-16 are also in group HV2 along with COUNTRY. This means that their history is tracked when all three (group HV1) change even if COUNTRY does not change, but COUNTRY itself will only be tracked when all four address attributes (group HV2) change. If an attribute is