Skip to content
Official PYQ · 2009

GATE CS 2009 Q56 — Normal Forms

Explain with AI

Consider the following relational schema:

  • Suppliers(sid:integer‾, sname:string, city:string, street:string)\text{Suppliers}(\underline{\text{sid:integer}},\text{ sname:string, city:string, street:string}) 
  • Parts(pid:integer‾, pname:string, color:string)\text{Parts}(\underline{\text{pid:integer}}, \text{ pname:string, color:string}) 
  • Catalog(sid:integer, pid:integer‾,cost:real)\text{Catalog}(\underline {\text{sid:integer, pid:integer}}, \text{cost:real})

Assume that, in the suppliers relation above, each supplier and each street within a city has 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\text{TRUE} about the above schema?

Choose one option
View worked solution

Answer: A

To determine the highest normal form of the given relational schema, we analyze each relation individually. Recall that a relation is in Boyce-Codd Normal Form (BCNF) if, for every non-trivial functional dependency X→YX \rightarrow Y, the determinant XX is a superkey.

1. Relation: Suppliers(sid‾,sname,city,street)\text{Suppliers}(\underline{\text{sid}}, \text{sname}, \text{city}, \text{street})

  • Primary Key: sid\text{sid}
  • Candidate Keys:
    • {sid}\{\text{sid}\} (Primary Key)
    • {sname,city}\{\text{sname}, \text{city}\} (Given as a candidate key)
  • Functional Dependencies (FDs): Since no other FDs are implied other than those by the primary and candidate keys, the non-trivial FDs are:
    • sid→sname,city,street\text{sid} \rightarrow \text{sname}, \text{city}, \text{street}
    • (sname,city)→sid,street(\text{sname}, \text{city}) \rightarrow \text{sid}, \text{street}

For both FDs, the left-hand side (determinant) is a candidate key (and hence a superkey). Thus, the Suppliers\text{Suppliers} relation is in BCNF.

2. Relation: Parts(pid‾,pname,color)\text{Parts}(\underline{\text{pid}}, \text{pname}, \text{color})

  • Candidate Key: {pid}\{\text{pid}\}
  • Functional Dependencies:
    • pid→pname,color\text{pid} \rightarrow \text{pname}, \text{color}

The determinant pid\text{pid} is a superkey. Thus, the Parts\text{Parts} relation is in BCNF.

3. Relation: Catalog(sid,pid‾,cost)\text{Catalog}(\underline{\text{sid}, \text{pid}}, \text{cost})

  • Candidate Key: {sid,pid}\{\text{sid}, \text{pid}\}
  • Functional Dependencies:
    • (sid,pid)→cost(\text{sid}, \text{pid}) \rightarrow \text{cost}

The determinant {sid,pid}\{\text{sid}, \text{pid}\} is a superkey. Thus, the Catalog\text{Catalog} relation is in BCNF.

Conclusion

Since all three relations in the schema are in BCNF, the entire schema is in BCNF.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Normal Forms questions