Data Warehousing practice Zatan (16) - slowly changing dimensions

[table of Contents]

Data Warehousing practice Zatan (16) - slowly changing dimensions

Slowly changing dimensions, also known as slow slowly changing dimension. This concept was put forward, in fact, it simply means the angle of our analysis is not static, but will change. On the front of the increment / zipper when more discussion of changes in the "facts" of the data. Business on a daily basis this is inevitable. But analysts also corresponding dimensions will change.

Such as customer information, a customer at the beginning of a A city, but after a certain point of time, moving to B city. In this track customer behavior when bound to consider the differences in different regions. And therefore it needs to be recorded before the current state of the customer. This situation can zipper Table As mentioned previously, increasing the effective data period (start and end dates). This is also called Type 2 SCD. The other two storage, think nothing worth. But we can mention the so-called Type 1 is does not retain history; Type 2 is to increase the field to retain history.

Bring a primary key issue here. General operating table has its own primary key, commonly referred to as business key. Business key business systems is unique. But in the repository, especially the zipper table, multiple records appear with a client. At this time, we will add a surrogate key - meaningless, usually digital, it is to represent the only record key.

In addition to increasing the surrogate key meet different period than the same record, you can also solve multiple business systems integration with the primary key conflict may exist.

Surrogate keys occur, the different states of an entity into a plurality of records, but by business key, can still aggregated to the same entity. Therefore, you can:

  • From a regional observation, early data attributable A city, post data attributed to B city (Assuming Customer Summary to the region);
  • From the customer to observe, directly through the customer summary of key services.

For financial institutions, especially banks, the agency is a very important dimension or angle analysis. But the agency can occasionally change, such as new establishment, merge and so on; can lead to aggregation rule changes before and after the change point in time. Under normal circumstances, a point in time before the change in the rules of the original summary, the summary after the point in time according to the new rules. But there are special needs, such as institutional ownership change though, but to summarize and present the results by comparing the previous ownership and so on.

To be continued.

Previous: Data Warehousing practice-talk (XV) - dimensional model

Previous: Data Warehouse topics for practice (xvii) - Data Rewind

Published 20 original articles · won praise 7 · views 2483

Guess you like

Origin blog.csdn.net/cfy_fantasyxx/article/details/104580055