Normalization Practice ANS Yong Choi BPA CSUB
1NF Customer_ID Name Street Phone 104 Mr. Ray Suchecki 123 Pond Hill Road, Detroit, MI, 48161 (313) 792-3546 624 Mr. Toby Stein 431 North Phillips Road, South Bend, IN, 46611 (219) 332-4847 627 Mr. Gilbert Scholten 3915 Hawthorne Avenue, Toledo, OH, 43603 (419) 332-2681 Student_ID Advisor Advisor_Office Class_1 Class_2 Class_3 1022 Jones 412 101-07 143-01 159-02 4123 Smith 216 201-01 211-02 214-01
2NF PK
Functional Dependencies in EMPLOYEE2 EmpID CourseTitle DateCompleted Salary DeptName Name Dependency on entire primary key PK PK EmpID Name, DeptName, Salary Dependency on only part of the key EmpID, CourseTitle DateCompleted Therefore, NOT in 2nd Normal Form!!
Conversion to 2NF Decomposed into two separate relations Both are full functional dependencies PK EmpID Salary DeptName Name PK PK CourseTitle DateCompleted EmpID
2NF Below table name is “Rental Info” and attributes are in below parenthesis. Arrowed direction shows functional dependency information. Rental Info (TransID, VideoID, Copy#, Title, Rent) Depend only on VideoID Depends on both TransID and VideoID
3NF: Define functional dependencies of below table using a functional dependency notation, then normalize to 3NF PK
3NF PK PK PK
BCNF Project Project_ ID Name Location Manager_ Address Budget PK PK Project_ ID Name Location Manager_ Address Budget Functional Dependencies: Project_ID -> Project_Name | Project_Location | Manager_ID | Project_Budget Manager_ID -> Manager_Name | Manager_Address