Problem
What problem is the pattern looking to solve
How do we model transactions which have Header and Detail records (i.e Order and Order Line) using a Data Vault modeling approach
Solution
A generalised design which can be applied to solve the problem given the context
Seperate Hubs are created for the Order Header and the Order Lines.
Details about the Order (Order Date, Total Order Amount) are stored in the Order Satellite, details about the Order Line are stored in the Order Line Satellite (Product, Product Unit Price, Product Quantity, Total Order Line Amount).
A Link is created to define the relationship for the Customer who placed the Order. A second Link is created to define the relationship for the Order, Order Lines and the Product for each Order Line.
The Order Hub drives the unit of work / grain for the Customer | Order link. The Order Line Hub drives the unit of work / grain for the Order | Order Line | Product link
A variation on this pattern is where we extend the detail driven link (Order Line) to include the Hubs from the Header driven link (Order)
So in this example we add Customer so the link becomes Customer | Order | Order Line | Product link. This removes the need to combine the two links if you need to report on which Customer ordered the products.
Context
A disucssion on when this pattern could be applied
TBD
Examples of Header/Detail source tables you might find are:
-
- Order / Order Line
- Order / Line Item
- Invoice / Invoice Line
- Product / Product Variant
Impact
The likely consequences of adopting this pattern
FOR
TBD
TBD
Your Title Goes Here
Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.
Your Title Goes Here
Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.
AGAINST
TBD
TBD
Related Patterns
Other patterns that are similair to this pattern or reliant upon it
Ask us to complete this pattern
Get in touch and let us know you would like us to complete this pattern next