Database Analysis-Unit-1I: Course Name: Faculty Name
Database Analysis-Unit-1I: Course Name: Faculty Name
Database Analysis-Unit-1I: Course Name: Faculty Name
What is Dependency?
Let's take an example of a Student table with columns
student_id, name, reg_no(registration number), branch
and address(student's home address)
And our Score table is now in the second normal form, with no
partial dependency.
Second Normal Form(2NF)
Quick Recap
For a table to be in the Second Normal form, it should
be in the First Normal form and it should not have
Partial Dependency.
Partial Dependency exists, when for a composite
primary key, any attribute in the table depends only on
a part of the primary key and not on the complete
primary key.
To remove Partial dependency, we can divide the table,
remove the attribute which is causing partial
dependency, and move it to some other table where it
fits in well.
Third Normal Form(3NF)
As you can see, we have also added some sample data to the table.
In the table above:
One student can enrol for multiple subjects. For example, student with
student_id 101, has opted for subjects - Java & C++
For each subject, a professor is assigned to the student.
And, there can be multiple professors teaching one subject like we have
for Java.
What do you think should be the Primary Key?
Boyce-Codd Normal Form (BCNF)
Hobbies Table