Home » Database » Database miscellaneous » Question

Database miscellaneous

Direction: Consider the following relational schemas :
Suppliers (sid : integer, sname : string, city : string, street : string)
Parts (pid : integer, pname : string, color : string)
Catalog (sid : integer, pid : integer, cost : real)

  1. Assume that, in the suppliers relation above, each supplier and each street within a city has a unique name, and (sname, city) forms a candidate key. No other functional dependencies are implied other than those implied by primary and candidate keys. Which one of the following is true about the above schema?
    1. The schema is in BCNF
    2. The schema is in 3NF but not in BCNF
    3. The schema is in 2NF but not in 3NF
    4. The schema is not in 2NF
Correct Option: A

As given that each supplier and each street within a city has a unique name, it means (same ,city) and (street ,city) combination is unique. So these will be candidate keys. There is no other FD other than CK determining attributes. In all FD, LHS will be SK.
Example:

Hence 2 candidate Keys are possible
(1) (Sname, city) ⇒ (QR)
(2) (Street, city) ⇒ (SR)

⇒ The relation suppcier is in BCNF So the relation should be in BCNF.



Your comments will be displayed only after manual approval.