We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
You cannot add course details of each student in the students table as it would violate 2NF cause each student can take up more than 1 course.
Also, you can't add the ids of students enrolled for each course for the same reason.
With an intermediate table which would map student_id to course_code, you can achieve the 2NF.
Hence, 2+1 tables required.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Database Normalization #3
You are viewing a single comment's thread. Return to all comments →
You cannot add course details of each student in the students table as it would violate 2NF cause each student can take up more than 1 course. Also, you can't add the ids of students enrolled for each course for the same reason.
With an intermediate table which would map student_id to course_code, you can achieve the 2NF.
Hence, 2+1 tables required.