0

I am a newbie in data vault modelling, I could not find a satisfying answer for the below query, pls help.

In Data Vault modelling, whether the below statement should met? If yes, should it be met 100%?

"The BKs in the Hub or Hubs should be such that, it should be sufficient to unique identify a record in the Satellite"

Thanks,

user957183
  • 417
  • 3
  • 10
  • 20

1 Answers1

1

The primary key of a satellite should be the key of the hub or link it attaches to plus the load date that row is inserted.

So you can have multiple entries in the satellite for one business key but you shouldn't have multiple entries for one point in time.

The above would also not be true in the case of a many to many relationship where there needs to be an additional field in the satellite primary key to make the rows unique (the classic example given is line number of multiple items within the same sale\invoice).

BarneyL
  • 1,332
  • 8
  • 15
  • IMHO your last example, considering line item, should be represented by a keyed instance. – Cedersved Dec 11 '19 at 12:57
  • @BarneyL thanks for your reply. As far as i understand, a PK in table should be the first candidate as a BK in Hub if the PK has a business value. Since its the PK of the table, it can uniquely identify a record in the table. But there could be cases, where a field other than the PK, would be a best fit as BK, (like phone_number) if it can uniquely identify a record in the table. – user957183 Dec 12 '19 at 06:52
  • @Cedersved I'd be inclined to agree but as it's used as an example scenario in the Data Vault book I thought I'd save myself from thinking of a better one. From my reading I'd say that since the 2.0 book opinion has swung more towards additional hubs for "weak" keys. – BarneyL Dec 12 '19 at 09:58
  • @user957183 Yes ideally your hub keys should be something that has real meaning to the business (car registration plate, passport number or similar) rather than an auto incremented number from the database back end. In theory this allows you to easily merge across systems. – BarneyL Dec 12 '19 at 10:01