Databases Reference
In-Depth Information
Appendix B. The Quotient: An Additional
Operation of the Relational Algebra
The quotient of two tables is not used often, but has a very specific use. It arises when we
wish to select those rows of a table that are sufficient to provide all possible values in
certain columns. As an example, imagine a business that makes furniture. The database
for this business has a table on the types of wood that they use, as well as on suppliers of
wood and which types they supply. Examples are shown in Table B-1 and Table B-2 (of
course, these tables would include more columns, but this is just to illustrate the point).
Table B-1. WOOD
Type
Mahogany
R ed oak
P oplar
Walnut
Table B-2. SUPPLIER/TYPE
Sname
Type
J ones Wood Supply
mahogany
A ustin Hardwoods
red oak
O range Coast
mahogany
J ones Wood Supply
poplar
West Lumber
poplar
J ones Wood Supply
walnut
A ustin Hardwoods
walnut
J ones Wood Supply
red oak
O range Coast
walnut
West Lumber
red oak
O range Coast
poplar
O range Coast
red oak
F red's Woods
walnut
Note that there are four types of wood. Suppose we want to know which suppliers supply
all four types—a reasonable question. The answer, which is shown in Table B-3 is called
the quotient of the table SUPPLIERS/TYPE by WOOD, written SUPPLIER/TYPE ÷
WOOD.
Table B-3. SUPPLIER/TYPE WOOD
Sname
J ones Wood Supply
Orange Coast
 
Search WWH ::




Custom Search