Professional Documents
Culture Documents
Suggested Answer: The Non-Key Attributes Are Fully-Functional Dependent of Prodcode, and There Is No Other Determinant in The Table. The
Suggested Answer: The Non-Key Attributes Are Fully-Functional Dependent of Prodcode, and There Is No Other Determinant in The Table. The
your answer.
(i) ORDER(OrderId, CustId, CustAddress, CustContact, OrderDate, OrderTotal) OrderId ! CustId OrderId ! OrderDate OrderId ! OrderTotal CustId ! CustAddress CustId ! CustContact CustContact ! CustId CustAddress ! CustId Suggested answer: It is noted from the dependencies specified above that: o OrderId ! CustId, OrderDate, OrderTotal o CustId ! CustAddress, CustContact o The attribute OrderId can be the key of the relation with a transitive dependency to identify CustAddress and CustContact through the attribute Custid. o Thus the relation is in 2nd normal form (2NF). (ii) PRODUCT(ProdCode, ProdDesc, Manufacturer, UnitPrice) ProdCode ! ProdDesc ProdCode ! Manufacturer ProdCode ! UnitPrice
Suggested answer: The non-key attributes are fully-functional dependent of ProdCode, and there is no other determinant in the table. The relation is in BCNF (iii) SCHEDULE(Campus, Course, Class, Time, RoomBldg) (Campus, Course, Class) ! Time (Campus, Course, Class) ! RoomBldg (Campus, Course, Time) ! Class
(Campus, Course, Time) ! RoomBldg (RoomBldg) ! Campus (Note that no two buildings on any of the university campuses have the same name.) Take the following sample data: Campus East East West Course Class Time 8:00-9:00 RoomBldg 212 AYE
Suggested answer: From the dependencies specified above, it is noted that there are three determinants: o (Campus, Course, Class) ! Time, RoomBldg o (Campus, Course, Time) ! Class, RoomBldg o RoomBldg ! Campus The first two determinants can be the primary key of the relation, and there is no partial dependency and transitive dependency. The third determinant cannot be used as the primary key, which implies that the determinant is not a candidate key. Thus the relation is in 3rd normal form (3NF).
To bring the relational table to BCNF, the relation is split into two relational tables by removing the non-candidate-key determinant from the SCHEDULE relational table as follow: SCHEDULE(RoomBldg, Course, Class, Time) Primary key (RoomBldg, Course, Class) Foreign key (RoomBldg) references ROOMBUILDING. ROOMBUILDING(RoomBldg, Campus) Primary key (RoomBldg)