W3C2 Assignment 2
W3C2 Assignment 2
B. Add ID columns called CustomerID and SaleID into the SALE table. Answer following
questions. (40 points)
2. List at least two functional dependencies. What is the determinant in each functional
dependency?
C. Comment on following designs (whether the primary keys are appropriate). (10 points)
D. Add ID columns called VendorID and PurchaseID into the PURCHASE table. Answer following
questions. (40 points)
2. List at least two functional dependencies. What is the determinant in each functional
dependency?
3. Is the PURCHASE relation well-formed? Why?
E. You may realize that items in SALE and PURCHASE tables are not connected. For example, for
the lamp sold to customer Anderson, we did not keep the information of where this lamp was
purchased. Add an additional ITEM table to remedy this problem. How would you design ITEM
table and how would you modify the tables you designed in Question B.4 and D.4 accordingly?
Discuss how you keep track of the items in both SALE and PURCHASE in this design. (Bonus: 5
points)