BKCC used twice in generating a HK for a link table

Hi, I’m asking this because I don’t understand why we are doing it.

We are creating hubs which use BKCC+BK to generate a HK.

e.g. (not the actual tables)
person_hub has PERSON_HK generated from BKCC + PERSON_BK
course_hub has COURSE_HK generated from BKCC + COURSE_BK

So far all good.

Then we create link tables but for some reason when we generate the HK we use the BKCC twice.

e.g.
enrolment_lnk used to relate person_hub and course_hub has ENROLMENT_HK generated from

BKCC + PERSON_BK + BKCC + COURSE_BK

My question is:

Why are we using the BKCC twice instead of just having BKCC + PERSON_BK + COURSE_BK ?

Am I missing something obvious?

What if your link table becomes multi-source? How will you guarantee uniqueness?
Yes an RV link-sat is 1:1 with the source that provided it but let’s say someone being adventurous decides to join a link to a link-sat they should not be then you’re relating data that isn’t.
The same could be said in PIT construction, picking link-sat records that shouldn’t be related.

BTW: You could even have a single source contain multiple BKCCs applicable for a single BK column. We had this when mapping MDM and multi-source data into same-as link table, horizontal bkcc assignment.

Thanks for that, I tried asking the person who implemented the pattern the same question and got no reply, I’ll pass your response on so at least now we’ll know why we’re doing it :smile:

All good… I use these forums to:

  • see what people are thinking when developing a DV
  • see what responses work and what doesn’t, i think this one does :wink:

Most has been collated into a blog: Rules for an (almost) unbreakable Data Vault | by Patrick Cuba | The Modern Scientist | Medium

Yes, this response works :smile: We’re just starting out; fwiw I got your book within the first 15 minutes of being told we would starting a DV project and have been working my way through your blogs. We’ve also (after a couple of false starts and then a bit of lobbying from me :wink:) engaged a DV consultant; there’s always that lag between being taught something and then being able to properly understand it. We’ll get there.

Exactly right… and do be careful which DV consultant you hired, a DV consultant will have opinions — of course we encourage that — but it is equally important to know which flavour of DV you’re building.