Database Reference
In-Depth Information
case, after the decomposition, the traditional mapping to the relational model
can be applied to the resulting decomposition.
5.7 Slowly Changing Dimensions
So far, we have assumed that new data that arrives to the warehouse only
corresponds to facts, which means dimensions are stable, and their data do
not change. However, in many real-world situations, dimensions can change
both at the structure and the instance level. Structural changes occur, for
example, when an attribute is deleted from the data sources and therefore it
is no longer available. As a consequence, this attribute should also be deleted
from the dimension table. Changes at the instance level can be of two kinds.
First, when a correction must be made to the dimension tables due to an
error, the new data should replace the old one. Second, when the contextual
conditions of an analysis scenario change, the contents of dimension tables
must change accordingly. We cover these two latter cases in this section.
We will introduce the problem by means of a simplified version of the
Northwind data warehouse. In this simplified version, we consider a Sales fact
table related only to the dimensions Time , Employee , Customer ,and Product ,
and a SalesAmount measure. We assume a star (denormalized) representation
of table Product , and thus category data are embedded in this table. Below,
we show instances of the Sales fact table and the Product dimension table.
TimeKey EmployeeKey CustomerKey ProductKey SalesAmount
t1
e1
c1
p1
100
t2
e2
c2
p1
100
t3
e1
c3
p3
100
t4
e2
c4
p4
100
ProductKey ProductName Discontinued CategoryName Description
p1
prod1
No
cat1
desc1
p2
prod2
No
cat1
desc1
p3
prod3
No
cat2
desc2
p4
prod4
No
cat2
desc2
As we said above, new tuples will be entered into the Sales fact table as new
sales occur. But also other updates are likely to occur. For example, when
a new product starts to be commercialized by the company, a new tuple in
Product must be inserted. Also, data about a product may be wrong, and in
this case, the corresponding tuples must be corrected. Finally, the category of
a product may need to be changed, not just as a result of erroneous data but
as a result of a new commercial or administrative policy. Assuming that these
 
Search WWH ::




Custom Search