| Normalization |
|
|
|
|
Problem to Fix : A student can take multiple courses and hence repeating groups. Soultion : Make a separate table for course & link it to student table using StudentID. This will results in the below design Student Table
Courses table
2nd Normal Form ==> No Non-Key field should depend on the part of the primary key. Problem to Fix : Here in Courses table the primary key is a composite key ID + StudentID. (student ID is not unique in itself, as one student may take multiple courses; similarly, course ID is not unique in itself as many students may take the same course; however, each student will only be taking a particular course once at any one time, so the combination of student ID + course ID gives us a unique primary key). And a non-key field Course Instructor is depending on the Course ID alone, which is only a part of the primary key. Solution : To fix this we create a third table, to get the below structure for our database. Student Table
Courses table
Student Courses table
3rd Normal Form ==> No fields may depend on other non-key fields. Ie each field in a record should contain information about the entity that is defined by the primary key. Problem to Fix : Here in student table, the primary key is Student ID & the non-key fields like Advisor Telephone & Advisor Address cannot be defined with the Primary key. Solution : To fix this we need to create a 4th table Advisor table, to get the below structure. Student Table
Courses table
Student Courses table
Advisor table
The database is in 3rd normal form now
Comments (19)
Powered by !JoomlaComment 4.0 beta2
|


