# Hubs using multiple columns as natural identifier - general names or multiple hubs ?

**URL:** <https://forum.data-community.org/t/hubs-using-multiple-columns-as-natural-identifier-general-names-or-multiple-hubs/723>\
**Category:** Data Vault 2.0\
**Tags:** business-key, hub\
**Created:** [March 29, 2023, 7:13pm UTC](https://forum.data-community.org/t/hubs-using-multiple-columns-as-natural-identifier-general-names-or-multiple-hubs/723 "2023-03-29T19:13:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mat](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@mat](https://forum.data-community.org/u/mat)\
**Post date:** [March 29, 2023, 7:13pm UTC](https://forum.data-community.org/t/hubs-using-multiple-columns-as-natural-identifier-general-names-or-multiple-hubs/723/1 "2023-03-29T19:13:00Z")

</div>

Hi everybody!

I need some advice regarding best practices in hub column naming convention - especially for multiple columns representing a business key.

My project situation:

I have source tables providing business keys for a business object “Contract”.  
The some tables provide the business key as a single column (e.g. contract\_uuid) as well as in two columns (e.g. company + contract\_number).  
contract\_uuid is a technical id, but very important because all others data is connected to it.  
company + contract\_number is the natural business identifier mainly used by business.

My Source:

## SRC\_TABLE\_1

contract\_uuid (contract\_bk\_1)  
company (contract\_bk\_2.1)  
contract\_id (contract\_bk\_2.2)

Therefore **I modeled two hubs**. One for single column contract business keys, one for two columns contract business keys.  
Also I modeled a same-as link to connect both hubs.  
**I have choosen generic names because it is very likely that there will be more business keys (single columns as well as multiple columns) coming from different source systems or tables. I want to store them in the same hubs to create a lightweighted model**

My DV Model:

## HUB\_CONTRACT

hk\_contract (hashkey: hash(contract\_uuid))  
id\_contract (business key : contract\_uuid from SRC\_TABLE\_1)

## HUB\_CONTRACT\_2

hk\_contract\_2 (hashkey: hash(company+contract\_id))  
id\_contract\_1 (business key : company from SRC\_TABLE\_1 )  
id\_contract\_2 (business key : contract\_id from SRC\_TABLE\_1)

## LNK\_SA\_CONTRACT\_\_CONTRACT\_2

hk\_contract\_\_contract\_2  
hk\_contract  
hk\_contract\_2

The challenges for me and the consumers are now:  
Because of my generic names the model is hard to read:

- What is HUB\_CONTRACT\_2 ?
- What values are in id\_contract\_1 or id\_contract\_2 ?

It even gets more complex, if my very likely second or third source system comes into play providing more single and multiple column keys.  
For example a natural identifier will be column IKER + OPSE. I plan to store them as well into HUB\_CONTRACT\_2.

- How does a consumer now only select records from HUB\_CONTRACT\_2, which id\_contract\_1 == company ?

The only way I see to solve this is to create multiple hubs.  
In my case HUB\_CONTRACT\_2 would be renamed on entity level as well as its columns would be renamed:

## HUB\_company\_contract

hk\_company\_contract (hashkey: hash(company+contract\_id))  
id\_company (business key : company from SRC\_TABLE\_1 )  
id\_contract (business key : contract\_id from SRC\_TABLE\_1)

## … as well as the link … LNK\_SA\_contract\_\_company\_contract

hk\_contract\_\_company\_contract  
hk\_contract  
hk\_company\_contract

But this solution has the big drawback that my model increases by unnecessary links and hubs … more joining at the end.

What is your design pattern or best solution for this situation ?  
Are you using general names for columns and use one hub for each grain of natural keys ? Are you opening new Hubs with specific names ?

Many thanks for any advice !

---

<div class="post-metadata">

**Author:** ![patrickcuba](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.data-community.org/patrickcuba/32/19_2.png) [@patrickcuba](https://forum.data-community.org/u/patrickcuba)\
**Post date:** [March 29, 2023, 9:37pm UTC](https://forum.data-community.org/t/hubs-using-multiple-columns-as-natural-identifier-general-names-or-multiple-hubs/723/2 "2023-03-29T21:37:00Z")

</div>

Is company + contract id unique or just contract\_id? Where does contract\_id come from?

---

<div class="post-metadata">

**Author:** ![neil.strange](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.data-community.org/neil.strange/32/407_2.png) [@neil.strange](https://forum.data-community.org/u/neil.strange)\
**Post date:** [March 30, 2023, 7:26am UTC](https://forum.data-community.org/t/hubs-using-multiple-columns-as-natural-identifier-general-names-or-multiple-hubs/723/3 "2023-03-30T07:26:17Z")

</div>

It looks like you have established company + contract id as the contract’s business key.

One feed has the company column missing. Can you infer the company value and substitute it? Or you could use a token such as ‘not provided’.

---

<div class="post-metadata">

**Author:** ![neil.strange](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.data-community.org/neil.strange/32/407_2.png) [@neil.strange](https://forum.data-community.org/u/neil.strange)\
**Post date:** [March 30, 2023, 7:31am UTC](https://forum.data-community.org/t/hubs-using-multiple-columns-as-natural-identifier-general-names-or-multiple-hubs/723/4 "2023-03-30T07:31:30Z")

</div>

An alternate business key could be:  
company + party + date of contract + contract type

Company - is one party to the contract; Party is the second party; contract type is added if you have different contract types (NDA, MSA, etc.), alternatively you could use contract title.

This assumes two parties do not sign more than one contract of a particular type on a single day. If they do, then other matters would come into the key. Or you have a version number for updated contracts.

---

<div class="post-metadata">

**Author:** ![mat](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@mat](https://forum.data-community.org/u/mat)\
**Post date:** [March 30, 2023, 8:44am UTC](https://forum.data-community.org/t/hubs-using-multiple-columns-as-natural-identifier-general-names-or-multiple-hubs/723/5 "2023-03-30T08:44:18Z")

</div>

company + contract\_id is unique.

Company is a code like ‘ZA’. Contract\_id is an increasing number including a smart date key like ‘2022123’ [yyyy+SEQ]. Both columns are provided by source system.

---

<div class="post-metadata">

**Author:** ![mat](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@mat](https://forum.data-community.org/u/mat)\
**Post date:** [March 30, 2023, 8:47am UTC](https://forum.data-community.org/t/hubs-using-multiple-columns-as-natural-identifier-general-names-or-multiple-hubs/723/6 "2023-03-30T08:47:10Z")

</div>

Thanks for your answers !

But how do you deal in general with the problem:

We have multiple sources providing the natural business keys by two columns identifying contracts. Only the combination of these two columns makes the contract unique.  
Please assume or take for granted that my identified columns are the correct columns identifying the business keys. Also the Business is using these columns to identify the contracts.

src1: company + contract\_id → ‘ZA’+‘2022123’  
src2: IKER + OPSE → ‘22’ + ‘ER07’

IKER is definitly not a comnpany and OPSE definitly not an increasing number.

Do you create a Hub with general column names or would it better to create an extra hub with explicit names ?  
Are both options valid ?

---

<div class="post-metadata">

**Author:** ![AHenning](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@AHenning](https://forum.data-community.org/u/AHenning)\
**Post date:** [March 31, 2023, 4:57am UTC](https://forum.data-community.org/t/hubs-using-multiple-columns-as-natural-identifier-general-names-or-multiple-hubs/723/7 "2023-03-31T04:57:15Z")

</div>

Hello mat!  
Welcome to the forum. Please be aware that my answer is my own opinion and it may differ from what most people think is good practise for a data vault.

I have done a lot of DV implementations and the biggest mistakes and most headache I got was when I implemented multiple bk columns in a hub. Try to avoid it.  
In your case I would ask myself:  
Is there descriptive data only for company?  
Is there descriptive data only for contract\_id?  
Is there descriptive data only for IKER?  
Is there descriptive data only for OPSE?  
If you answer yes to any of the above questions you need a hub to only hold one of the BKs.  
And if you have a hub with a list of keys, you would not like the same list in another hub concatinated with some other bk.  
If you discover that some of the keys should be hubs and some of them should not(holding no descriptive values) then I would use a peg link.  
Also, I opened my mind a little when I did my certification, I like you, had some hard questions for Michael Olschimke and one of his answers that I remember is: “physical implementation differs from logical modelling, use the capabilities of your RDBMS”. That can of Course be interpreted in a sorts of ways but it got me thinking and asking myself these questions:  
Can a hub be implemented in more than one table? Can a link only contain peged values? Can a link be implemented in more than one table? What happens with performance If you are forced to use a BKCC?  
Hope this helps on your DV Journey.

---

<div class="post-metadata">

**Author:** ![patrickcuba](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.data-community.org/patrickcuba/32/19_2.png) [@patrickcuba](https://forum.data-community.org/u/patrickcuba)\
**Post date:** [April 16, 2023, 10:13pm UTC](https://forum.data-community.org/t/hubs-using-multiple-columns-as-natural-identifier-general-names-or-multiple-hubs/723/8 "2023-04-16T22:13:58Z")

</div>

I’d discourage using dates as business keys! Otherwise it looks like you have sorted this out

---

<div class="post-metadata">

**Author:** ![RhysHanscombe](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.data-community.org/rhyshanscombe/32/394_2.png) [@RhysHanscombe](https://forum.data-community.org/u/RhysHanscombe)\
**Post date:** [December 1, 2025, 2:50pm UTC](https://forum.data-community.org/t/hubs-using-multiple-columns-as-natural-identifier-general-names-or-multiple-hubs/723/9 "2025-12-01T14:50:19Z")

</div>

Closed on December 1, 2025, 2:50pm UTC


