banner



What Is A Dimension In Data Warehousing

Types of Dimensions in Data Warehouse

Photo by Sigmund on Unsplash

Metrics, metrics, metrics! Today, we want to capture every click, every ringlet, every event within our application and runs jobs over them. This is well known(fact:P) that these metrics are gold(or should I say oil?) but accept y'all thought most the underdogs, the dimensions that these metrics refer to?

This article is me taking you back to the basics of information warehousing and going over the different types of dimensions seen in data warehousing. If you are already familiar with what dimensions are you lot tin skip to the next section.

Permit me touchpoint upon the what of dimensions first, so what are dimensions?

Dimensions are the style we run across, measure and experience our earth. In the Data Landscape, this can be translated to dimensions are the entities over which we measure our data and answer business queries. Dimensions are the how'southward of metrics. For instance: how the metrics relates to geography?

The easiest way to visualize and understand dimensions are their placement in the star schema:

Having defined dimensions, let's motion on to the next department to hash out what are the unlike types of dimensions.

Types of Dimensions

Based on the frequency of alter of dimension information technology tin be classified into iii types:

Static Dimension: Dimensions which does not alter over time. These dimensions are very easy to implement. For instance, the birth date of the user.

Slowly irresolute dimension(SCD): Dimensions that modify or can change slowly over time. There are multiple ways to implement SCD depending upon how you lot want to deal with the changes that happen.

For instance, allow's say the user moved from India to the U.s.a. in February, 21and we want to update the land of the user in the dimension tabular array which is maintained equally

The various approaches to design SCD are:

  • SCD — Blazon 0: When a change happens, retain the original value. The updated dimension table:

  • SCD — Blazon I: When a modify happens, overwrite the original value. The updated dimension table:

  • SCD — Blazon II: When a alter happens, add together a new row. Utilise Blazon-II dimension design when yous want to maintain a history of the change for dimensions. The updated dimension table:

  • SCD — Blazon 3: When a change happens, add a new cavalcade. The updated dimension table:

  • SCD — Type IV: When a modify happens, overwrite and maintain a dissever history table.

Rapidly Changing Dimension: Dimensions that change or can change speedily over time. For instance, the weight of the user. Rapidly irresolute dimensions are generally implemented as junk dimensions explained below.

The above covered the dimension nomenclature based on the frequency of the change, in that location are other categorizations for dimensions likewise based on how they are stored and a couple of other factors. Some of them are divers beneath:

Degenerate Dimensions: Dimensions that are stored as a office of the fact tabular array and not in a carve up table. The conclusion to store dimension as a degenerate dimension can depend on a couple of factors like query operation considerations. For instance, the name of the user tin can be stored as a part of the fact table.

Conformed Dimensions: These are the dimensions that have the same significant no matter where they are referenced. For case, a calendar dimension table.

Junk Dimensions: This can be interpreted as a miscellaneous table that can be maintained to store unrelated attributes together and can be referenced with a single foreign key when one doesn't desire to maintain too many strange keys in the fact table to too many dimension tables. These are commonly implemented to handle fast-changing or rapidly changing dimensions.

Inferred Dimensions: These are the dimension tabular array blazon to handle belatedly data, in a scenario where a fact table is loaded before the references are available in the dimension table. In such a instance, to respect referential integrity, a new record having Cypher for all dimension attributes tin exist created in the dimension table which the fact tabular array can infer. This new row can be updated when dimension data is bachelor.

Well, that was a lot of information in three minutes! Hope this helped in clarification of some of the types of dimensions seen in the data warehousing.

Until next time,
JD

What Is A Dimension In Data Warehousing,

Source: https://towardsdatascience.com/move-over-facts-know-your-dimensions-e1489862f9a0

Posted by: myerstimentep.blogspot.com

0 Response to "What Is A Dimension In Data Warehousing"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel