Databases Reference
In-Depth Information
As you can see, the quotient can certainly come up in real-life situations. The reason for
defining a specific operation for this purpose is that expressing the quotient in terms of
the other relations is a bit complex. Let's do it to illustrate the virtue of the quotient.
The idea is actually relatively simple. We first get a table, called T, containing all rows
that are not in the SUPPLIER/TYPE table. This new table will involve only those
suppliers who have not supplied all types of wood. (If a supplier supplies all four types of
wood, then there will be four rows in the SUPPLIER/TYPE table and therefore no rows
in T.) Then we subtract this from a table containing all (participating) suppliers. Here is
the step-by-step procedure.
B.1 Step 1
Form the table:
R = [projSName(SUPPLIER/TYPE) WOOD] - SUPPLIER/TYPE
Table B-4, the table R, contains all rows of the form ( SName,Type ) that are not in the
SUPPLIER/TYPE table. Put another way, it is the set of “missing possibilities” in the
Cartesian product (which is the set of all possibilities).
Table B-4. R
Sname
Type
A ustin Hardwoods
p oplar
West Lumber
w alnut
A ustin Hardwoods
mahogany
West Lumber
mahogany
F red's Woods
w alnut
B.2 Step 2
Form the table:
projSName(R)
That is, project the table R onto the SName column, giving the SUPPLIERS that do not
supply all types of wood, as shown in Table B-5.
Table B-5. projSName(R)
SName
A ustin Hardwoods
West Lumber
F red's Woods
 
 
Search WWH ::




Custom Search