如何在使用 Data Vault 原则建模的数据库中使用交叉引用 table?

How to use cross reference table in a database modeled using Data Vault principles?

我有一个带有性别属性的 Person Satellite。在源系统中,此属性的值可以是:F、M、FEMALE 或 MALE。以下两种方法中哪一种是正确的 Data Vault 建模方法?

  1. 将来自来源的数据按性别存储,并在 Business Vault 或数据集市中将值标准化为仅 FEMALE 和 MALE

  2. 创建一个交叉引用 table 将 F 映射到 FEMALE,将 M 映射到 MALE,同时加载 Person Satellite,使用交叉引用将 F 转换为 FEMALE,将 M 转换为 MALE table.

我正在使用支持列压缩的 Amazon Redshift。

当您有一个随时间变化的非常复杂的业务逻辑但 F/Female 和 M/Male 映射是一个非常简单和稳定的逻辑时,数据保险库概念很有用。进行交叉引用会使这里的事情变得过于复杂。我只是将值标准化为 F/M 并在此处使用不压缩的 char(1) 列。

我给 Data Vault 建模方法的创建者 Daniel Linstedt 发了邮件,问他同样的问题。他的回答:

"I typically store it as it comes in, THEN translate it on the way to the Business DV.  This way, if the business ever changes it's mind, we can re-write the translation rule without affecting history.  But more than that, I've seen source systems that deliver values outside the boundaries of what's acceptable.  Do not try to translate on the way in to the Raw DV, to do so would destroy auditability."