Database Reference
In-Depth Information
Q&A
Question: Is Class the primary key for the Part table?
Answer: No, because the other columns are not functionally dependent on the class. The item class HW, for
example, appears on a row in the Part table in which the part number is AT94, a row in which the part num-
ber is DL71, and a row in which the part number is FD21. The item class HW is associated with three part
numbers, so the part number is not functionally dependent on the class.
160
Q&A
Question: Is CustomerNum the primary key for the Customer table?
Answer: Yes, because customer numbers are unique. A given customer number cannot appear on more than
one row. Thus, each customer number is associated with a single name, a single street, a single city, a single
state, a single zip code, a single balance, a single credit limit, and a single rep number. In other words, all
columns in the Customer table are functionally dependent on CustomerNum.
Q&A
Question: Is OrderNum the primary key for the OrderLine table?
Answer: No, because it does not uniquely determine NumOrdered or QuotedPrice. The order number 21617,
for example, appears on a row in the OrderLine table in which the number ordered is 2 and the quoted price
is $794.95 and on a row in which the number ordered is 4 and the quoted price is $150.00.
Q&A
Question: Is the combination of OrderNum and PartNum the primary key for the OrderLine table?
Answer: Yes, because all columns are functionally dependent on this combination. Any combination of an
order number and a part number occurs on only one row in the OrderLine table and is associated with only
one value for NumOrdered and only one value for QuotedPrice. Further, neither OrderNum nor PartNum
alone has this property. For example, order number 21617 appears on more than one row, as does part
DR93.
Q&A
Question: Is the combination of PartNum and Description the primary key for the Part table?
Answer: No. It is true that this combination functionally determines all columns in the Part table. PartNum
alone, however, also has this property.
Search WWH ::




Custom Search