Databases Reference
In-Depth Information
step 2: recursively Join the market Basket
table and load a market Basket BI table
The second step joins the Market Basket Table to itself by referencing
the Market Basket Table twice. The first reference to the Market Basket
Table has the alias A . The second reference to the Market Basket Table
has the alias B . In the RDBMS platform this has the effect of operating
on the same Market Basket Table as though it were two separate tables.
Chapter 6 explained a database design that will optimize this recursive
join.
FigureĀ 7.2 shows this recursive join and load into the Market Basket BI
Table as a single operation. A Market Basket ETL application may perform
this operation in one step, or it may perform it as a two-step operation.
The important aspects of the SQL in FigureĀ 7.2 are the recursive join and
the nonequality.
'(/(7()5200$5.(7B%$6.(7B%,B7$%/(
,16(57,1720$5.(7B%$6.(7B%,B7$%/(
,7(06(7B.(<
'5,9(5B2%-(&7B.(<
'5,9(5B48$17,7<
'5,9(5B'2//$56
'5,9(5B&2817
&255B2%-(&7B.(<
&255B48$17,7<
&255B'2//$56
&255B&2817
6(/(&7
$,7(06(7B.(<
$2%-(&7B.(<$6'5,9(5B2%-(&7B.(<
$48$17,7<$6'5,9(5B48$17,7<
$'2//$56$6'5,9(5B'2//$56
$6'5,9(5B&2817
%2%-(&7B.(<$6&255B2%-(&7B.(<
%48$17,7<$6&255B48$17,7<
%'2//$56$6&255B'2//$56
$6&255B&2817
)5200$5.(7B%$6.(7B7$%/($
,11(5-2,10$5.(7B%$6.(7B7$%/(%
21$,7(06(7B.(< %,7(06(7B.(<
:+(5($2%-(&7B.(<!%2%-(&7B.(<
$1'$2%-(&7B.(<!
fIGure 7.2
Load Market Basket BI Table.
Search WWH ::




Custom Search