# DWH design approaches

<figure><img src="https://3167488510-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN5Oxfr1ogoEGQMX2dzNM%2Fuploads%2Ffjez4vQInD9C6splX2Fb%2Fimage.png?alt=media&#x26;token=e64a33d0-b963-466e-b216-6731e1e41ecf" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Note: there are functional differences between the ER model used in the OLTP and OLAP systems.
{% endhint %}

### Top Down Approach (Inmon)

* Uses ER (Entity Relationship) in 3NF on DWH
* Uses DM (Dimensional Model) on Data Marts
* DWH is the priority, and it feeds the Data Marts
* DWH has atomic level data
* Data Marts have summary
* Faster inserts into the DWH

<figure><img src="https://3167488510-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN5Oxfr1ogoEGQMX2dzNM%2Fuploads%2FW4bzUx1cMbwdhdwQ7Wlg%2Fimage.png?alt=media&#x26;token=47a0a3cd-b969-4d51-a3c4-b87efd377d07" alt=""><figcaption></figcaption></figure>

### Bottom Up Approach (Kimball)

* Uses DM (Dimensional Model) on both layers
* Data Marts are the priority, and it feeds the Data Warehouse
* Data marts contain both Atomic and Summary data
* Data marts deployed incrementally and integrated using conformed dimensions

<figure><img src="https://3167488510-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN5Oxfr1ogoEGQMX2dzNM%2Fuploads%2FbKt1WBgZFqx4zaJTLf9a%2Fimage.png?alt=media&#x26;token=4a4ad922-c01e-44cc-8e1e-d1bc36cb4969" alt=""><figcaption></figcaption></figure>

### Pros and Cons

#### Advantages of Kimball’s architecture

* Simplicity and speed. Kimball’s architecture is much simpler and faster to design and set up. Understandable. The dimensional data model is easy to understand for non-technical and technical employees alike.
* Relevancy. Unlike Inmon’s architecture, Kimball’s bottom-up approach makes all data integrations relevant to the business needs.
* Engineering team needs. Kimball’s approach needs fewer engineers with less specialized technical skills to both set up and maintain the data warehouse than Inmon's approach.

#### Disadvantages of Kimball’s architecture

* Data redundancy. Because data is loaded into a dimensional model, there is more data redundancy and therefore a higher chance for errors.
* No single source of truth. Data within the data warehouse is designed and organized around data marts. Coupled with data redundancy, Kimball’s architecture does not keep a single source of truth throughout the enterprise.
* Less flexible. As data needs change, business requirements alter, and incoming data sources modify their payloads, Kimball’s architecture is less flexible to changes and adapts more slowly. Incomplete. Kimball's approach starts (and ends) at critical business processes. Therefore it does not offer a complete 360 view of enterprise data. Rather, it is useful for business reporting of specific subject areas.

#### Advantages of Inmon’s architecture

* Flexibility. Inmon’s approach is much more flexible to changing business requirements and more flexible to modifications to the data sources. Because of the ETL process design that leads to normalized data, Inmon’s architecture is more adaptable. The architects change just a couple of normalized tables, and the change is propagated downstream.
* Single source of truth. Because of the normalized data model, the data warehouse acts as a single source of truth throughout the enterprise. Less prone to errors. Normalization avoids data redundancy so both the engineering processes and analytic processes are less prone to errors.
* Completeness. Inmon's approach covers all the Enterprise data, so all the reporting needs are covered.

#### Disadvantages of Inmon’s architecture

* Initial set-up and maintenance cost. Setting up and maintaining Inmon’s architecture is much more expensive than the time and investment needed for Kimball’s architecture. Normalized schemas exhibit greater complexity both in design and maintenance than their denormalized counterparts.
* Skills needed. Inmon’s approach necessitates highly skilled engineers, which are harder to find and more expensive to keep on the payroll.
* More ETL is needed. By separating data marts from the data warehouse, more ETL processes are needed to construct the data marts, therefore leading to more engineering overhead.

### When to use

Kimball is the better choice if you want to see results faster, have a small team of engineers, and foresee little changes in the business requirements. Otherwise, the data redundancy could cause anomalies and maintenance costs down the line.

Inmon is the go-to for huge enterprises that wish to see a complete picture of their enterprise data, even if the deployment of the data warehouse is going to cost them more and take longer than Kimball’s counterpart.

### References

[kebool.com - Kimball vs Inmon](https://www.keboola.com/blog/kimball-vs-inmon)
