6.3.8
Since model numbers are unique, a full natural outer join of PC, Laptop and
Printer will return one row for each model. We want all information about PCs,
Laptops and Printers even if the model does not appear in Product but vice versa
is not true. Thus a left natural outer join between Product and result above is
Alternately, the Product relation can be joined individually with each of
PC,Laptop and Printer and the three results can be Unioned together. For
attributes that do not exist in one relation, a constant such as ‘NA’ or 0.0 can
be used. Below is an example of this approach using PC and Laptop.
SELECT R.MAKER ,
R.MODEL ,
R.TYPE ,
UNION
SELECT R.MAKER ,
R.MODEL ,
R.TYPE ,