Page 199 -
P. 199

11-ch04-125-186-9780123814791
                                                            2011/6/1
                         HAN
          162   Chapter 4 Data Warehousing and Online Analytical Processing  3:17 Page 162  #38



                         indexing maintains relationships between attribute values of a dimension (e.g., within
                         a dimension table) and the corresponding rows in the fact table. Join indices may span
                         multiple dimensions to form composite join indices. We can use join indices to identify
                         subcubes that are of interest.

            Example 4.8 Join indexing. In Example 3.4, we defined a star schema for AllElectronics of the form
                         “sales star [time, item, branch, location]: dollars sold = sum (sales in dollars).” An exam-
                         ple of a join index relationship between the sales fact table and the location and item
                         dimension tables is shown in Figure 4.16. For example, the “Main Street” value in the
                         location dimension table joins with tuples T57, T238, and T884 of the sales fact table.
                         Similarly, the “Sony-TV” value in the item dimension table joins with tuples T57 and
                         T459 of the sales fact table. The corresponding join index tables are shown in Figure 4.17.


                                             sales
                           location                          item
                                             T57
                          Main Street                       Sony-TV
                                             T238


                                             T459

                                             T884



              Figure 4.16 Linkages between a sales fact table and location and item dimension tables.

                         Join index table for  Join index table for
                         location/sales       item/sales
                           location  sales_key  item     sales_key
                          Main Street  T57     Sony-TV    T57
                          Main Street  T238    Sony-TV    T459
                          Main Street  T884

                         Join index table linking
                         location and item to sales

                           location   item    sales_key
                          Main Street  Sony-TV  T57



              Figure 4.17 Join index tables based on the linkages between the sales fact table and the location and item
                         dimension tables shown in Figure 4.16.
   194   195   196   197   198   199   200   201   202   203   204