💻 Tech
In data warehouse, there might be a need to capture the changes in an entity’s attribute. It’s what SCD or Slowly Changing Dimension is about. A “dimension” contains attributes or characteristics of the entity to support a “fact”, which contains the metrics or measurable characteristics. If there’s a need to keep track of changing attribute data, SCD can be used. In the example below, Product A was changed to a different category
| ProductID | ProductName | Category | fromDate | toDate |
|-----------|-------------|------------|--------------------|--------------------|
| 1 | Product A | Electronics| 2021-03-25 00:30:00| 2021-03-30 12:17:00|
| 1 | Product A | Home | 2021-03-30 12:17:00| 0001-01-01 00:00:00|