(a) The schema of the data warehouse; (b) the dimension hierarchies of
the example
40 Karayannidis, Tsois, & Sellis
Copyright ?© 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of
Idea Group Inc. is prohibited.
Definition 1 (Hierarchical Surrogate Key).
Assume a dimension table D containing the hierarchical attributes hm, hm-1, ??¦, h1 (hm
the most aggregated level and h1 the most detailed one). Each tuple t of D assigns
the values t.vm, t.vm-1, ??¦, t.v1 to the corresponding hierarchical attributes. Let {oci}
be a set of m bijective functions so that oci: Vi ?? {0,??¦,|Vi|-1}, where 1 ?‰¤ i ?‰¤ m and
Vi is the set of values of the hierarchical attribute hi and |Vi| is the total number of
values in this set. The hierarchical surrogate key (or h-surrogate) of D is a computed
attribute of D so that for each tuple t of D the value of the h-surrogate is hsk=ocm(t.
vm). ocm-1(t.vm-1). ??¦. oc1(t. v1). ?‚?
The value assigned by a oci function to a hierarchical attribute value is called an
order-code and since these functions are 1-1 the order-codes uniquely identify a
hierarchical attribute value. In Figure 2(b) we depict the hierarchy-tree formed from
the values of the hierarchy attributes (equivalently levels) of dimension LOCATION.
Below each value appears in parentheses its assigned order-code.
Pages:
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282