Lecture #6 - Slowly Changing Dimensions

Lecture #6 - Slowly Changing Dimensions - Lecture #6 -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture #6 - Slowly Changing Dimensions A slowly changing dimension is exactly what it sounds like. Any dimension can be slowly changing. A record in a customer dimension intuitively represents a customer. A record in a product dimension intuitively represents a product. A subtle assumption in all dimensions is that they are independent of time. But what do we do when a customer changes? Or a product changes? In response to these changes, the data warehouse has three main options: Type I: Overwrite the new dimension record with the new values, thereby losing history. Type II: Create a new additional dimension record using a new value of the surrogate key. Type III: Create an old field in the dimension record to store the immediate previous value. The above three options are used to handle Slowly Changing Dimensions (SCDs). The key assumption is that the production product key or the production customer key does not change, but the description of the product or the customer changes. Type I: Overwrite the Value Type I response is used when whenever the old value of the attribute has no significance or should be discarded. The correction of an error falls into this category. For example if the phone number of a customer has been entered wrongly and it is detected, use Type I response. Surrogate key 01596-244807 Natural Key 123456 7 Navneet Goyal Pilani 0159- 7644808 CUST11111 Type I response is easy to implement, but it does not maintain any history of prior attribute values. The attribute always reflects the latest assignment. The data warehouse has a responsibility to track history accurately, so we can’t afford to overwrite the prior customer description with the new one. Similarly, we can’t overwrite the old product description. In this approach the fact table is left untouched. The rows in the fact table still reference the surrogate key 1234567.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Lecture #6 - Slowly Changing Dimensions - Lecture #6 -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online