12. So putting things together The above relation is now in 2NF since the relation has no non-key attributes. Supplier Address Cost Supplier Description Inventory Cost Supplier Description Inventory Supplier Address Name Supplier
13. 3) Remove columns that are not dependent upon the primary key. So for every nontrivial functional dependency X --> A, (1) X is a superkey, or (2) A is a prime (key) attribute.
14.
15.
16. The table in 3NF 300 P1 Jones S2 200 P2 Yues S1 250 P3 Yues S2 100 P1 Yues S1 QTY PART# SNAME SUPP#
20. Third Normal Form: Each column must depend on *directly* on the primary key.
21. Boyce-Codd Normal Form (BCNF) Boyce-Codd normal form (BCNF) A relation is in BCNF, if and only if, every determinant is a candidate key. The difference between 3NF and BCNF is that for a functional dependency A B, 3NF allows this dependency in a relation if B is a primary-key attribute and A is not a candidate key, whereas BCNF insists that for this dependency to remain in a relation, A must be a candidate key.
22.
23. Example of BCNF(2) To transform the ClientInterview relation to BCNF, we must remove the violating functional dependency by creating two new relations called Interview and StaffRoom as shown below, Interview ( clientNo , interviewDate , interviewTime, staffNo) StaffRoom( staffNo , interviewDate, roomNo) Interview StaffRoom BCNF Interview and StaffRoom relations SG5 SG37 SG5 SG5 staffNo 10.30 1-Jul-02 CR56 12.00 13-May-02 CR74 10.30 13-May-02 CR76 12.00 13-May-02 CR76 interviewTime interviewDate ClientNo SG5 SG37 SG5 staffNo G102 1-Jul-02 G102 13-May-02 G101 13-May-02 roomNo interviewDate