Data ManagementTechnical

3 Reasons to Implement a Data Vault Model (and 2 Reasons Not to)

By June 16, 2020 No Comments
https://en.wikipedia.org/wiki/Data_vault_modeling

One of the first steps we take for any client seeking an enterprise data warehouse or an updated reporting solution is to determine the best possible way to organize their information by developing a data model. We often consider the benefits of two forms of data models when deciding which would be best for our clients. The first is a relational model, the second, which many clients are less familiar with, is a data vault model.

Both options feed information into the data warehouse used for reporting but there are some key differences to consider. Making the right decision around how source data is modeled and organized can make or break the performance and quality of your organization’s ETL process and reporting.

In this post, we’ll focus on the Data Vault Model. We’ll review what it is and explore scenarios around when to use it and when not to use it.

What is a Data Vault model?

A Data Vault model, more commonly referred to as simply Data Vault, is a practice of organizing data that separates structural information, such as a table’s unique identifier or foreign key relationships, from its attributes. It was created to enable storage and auditing of historical information, allow for parallel loading, and allow organizations with many source systems to scale without needing to redesign the entire solution. It adds flexibility and scales easily, making it great for growing organizations that would normally encounter many redesigns of their data solution. To achieve these benefits, the model is comprised of three basic table types:

  • Hub Tables hold all unique business keys of a subject. For example, HUB_EMPLOYEE may use an employee number to identify a unique employee.
  • Link Tables track all relationships between Hubs. For example, LINK_EMPLOYEE_STORE would track the relationship between an employee and the stores they work at.
  • Satellite Tables hold any attributes related to a Link or Hub and update them as they change For example, SAT_EMPLOYEE may feature attributes such as the employee’s name, role, or hire date.

3 Reasons to Use Data Vault

Reason 1: You Have Multiple Sources Systems and Relationships that Change Frequently.
Data Vault provides the most benefits when your data comes from many source systems or has constantly changing relationships. Data Vault works well for systems with these characteristics because it makes adding attributes simple, if there is a change to only one source system, that change doesn’t have to show up for all source systems. Similarly you can limit the number of places changes are made since attributes are stored separately from structural data in satellites. Additionally it is easier to account for new and changing relationships by closing off one Link and creating another. You do not have to change the historical data to account for a new relationship, or update an existing schema, you only need to account for the changes going forward.

Reason 2: You Need To Be Able To Easily Track And Audit Your Data.
Data Vault inherently enables auditing as load times and record sources are required for every row. It also tracks a history of all changes as Satellites include the load time as part of the primary key. When an attribute is updated, a new record is created. All of this auditing enables you to easily provide auditability for both regulatory and data governance purposes. Since you store all of your history, you can access data from any point in time.

Reason 3: You Need Data From Multiple Systems To Load Quickly.
Data Vault additionally enables quicker data loading since many of the tables can be loaded at the same time in parallel. The model decreases dependencies between tables during the load process and simplifies the ingestion process by leveraging inserts only, which load quicker than upserts or merges.

When would I NOT use Data Vault?

Reason 1: You Need To Load Data Directly Into Your Reporting Tool.
First and foremost, a data vault model should never directly feed into your reporting tool. Due to the necessity of the three types of tables, it would require your reporting tool to marry together all related tables to report on one subject area. These joins would slow down report performance and introduce the opportunity for error since reporting tools are not meant to do that form of data manipulation. The Data Vault model would need to feed data into a dimensional model or have an added reporting layer to enhance report performance. If you plan to implement a data model that can be directly reported on, you should create a dimensional model.

Reason 2: You Only Have One Source System And/Or Relatively Static Data.
Another situation where data vaults are not a great fit are when data is relatively static or comes from a single source system. In these cases, you will not be able to glean many of the benefits of Data Vault, and a dimensional model may be more simplistic and require less data manipulation. Implementing a data vault would require an increased amount of business logic where it is not needed. Furthermore, Data Vault requires a lot more storage. Splitting up a subject area into three different tables essentially increases the number of tables by at least a multiple of three – not to mention the inserts-only nature of those tables. For these reasons, a Data Vault model is not worth implementing if your data is straightforward and the benefits mentioned above can be easily attained through a more simple Dimensional Model.

While the factors to consider are outlined above, this decision is often nuanced and falls within the gray areas. The impacts outlined above show up in unexpected ways and become more impactful over time. Aptitive has helped many organizations determine if reconsidering their architecture and implementing a Data Vault Model is the answer for their challenges.

If you’re interested in learning more about data modeling, data architecture, or data management in general, fill out our quick contact form to set up a free, no-obligation data consultation and whiteboarding session.