Search code examples
data-warehousedata-vault

Storing dictionary values in the Data Vault DWH


Let's say I have some entity, for example Order. It can have status attribute, let's say with a code N what would mean "new order". There is another dictionary table that holds all of these order statuses values. How to design the database structure for it? What should I put to satellite? The status code? Description? Or both?


Solution

  • Model the key/value structure as reference table

    In the raw data vault satellite, keep the status "N" for auditing purpose (you must always be able to give back the data to the user as it were when you first fetch them).

    If there's some business rules you need to apply in a business vault, then you can then keep the description in the business vault satellite.