How to model Many-to-Many relationship in Data Vault OR What is a Record Tracking Satellite

At times you need to model Many-to-Many relationship that changes over time in Data Vault. For e.g., you may have HUB_CUSTOMER and HUB_ADDRESS. Several Customer may be associated with the same Address, and also multiple Addresses can be associated with a single Customer. And this can change over time. For e.g. 

Day 1:

HUB_CUSTOMER_HASHKEYHUB_ADDRESS_HASHKEY
111aaa
111bbb
111ccc

Day 2:

HUB_CUSTOMER_HASHKEYHUB_ADDRESS_HASHKEY
111aaa
111bbb
222ccc

Day 3:

HUB_CUSTOMER_HASHKEYHUB_ADDRESS_HASHKEY
111aaa
111bbb
222ccc
111ccc

 

LINK_CUSTOMER_ADDRESS will only capture the first occurrence of the relationship, but will not capture the changing nature of the relations. LINK_CUSTOMER_ADDRESS will look as follows:

LINK_CUSTOMER_ADDRESS_HKHUB_CUSTOMER_HKHUB_ADDRESS_HKLOAD_DATE
1qaz111aaaDay 1
2wsx111bbbDay 1
3edc111cccDay 1
4rfv222cccDay 2

Note that the Link is only capturing the first appearance of the relationship, but nothing about the effectivity of the relationship. This is where you need the Record Tracking Satellite. A Record Tracking Satellite is a narrow table that keeps tracks of LINK Hashkeys or SAT HASHKEY for each load. It basically captures all the HASHKEYs that are valid for that load. The Record Tracking Satellite for the above Many-to-Many relationship that changes over time will look as following

LINK_CUSTOMER_ADDRESS_HKLOAD_DATE
1qazDay 1
2wsxDay 1
3edcDay 1
1qazDay 2
2wsxDay 2
4rfvDay 2
1qazDay 3
2wsxDay 3
4rfvDay 3
3edcDay 3

This way you can capture the effectivity of Many-to-Many relationships that change over time. 

 

Data Vault Record Tracking Satellite hanging from a Link