Table Example
Table Example
StudentID Courses
1 Math, Physics, Chem
2 English, History
This table is not in 1NF because the "Courses" column contains a list of values.
To convert it to 1NF:
StudentID Course
1 Math
1 Physics
1 Chem
2 English
2 History
Definition:
A table is in 2NF if it is in 1NF and all non-key attributes are fully functionally
dependent on the primary key.
Requirements:
It must be in 1NF.
All non-key attributes must be fully functionally dependent on the primary key.
This table is not in 2NF because the "InstructorEmail" attribute is dependent on the
instructor, which is part of the composite primary key.
To convert it to 2NF:
CourseID Instructor
1 Dr. Smith
2 Dr. Brown
3 Dr. Smith
Instructor InstructorEmail
Dr. Smith [email protected]
Dr. Brown [email protected]
Definition:
Requirements:
It must be in 2NF.
Eliminate transitive dependencies.
Example: Consider a table with information about students, courses, and instructors:
This table is not in 3NF because "InstructorEmail" is transitively dependent on the primary
key (StudentID).
To convert it to 3NF:
InstructorID
StudentID Instructor
StudentName InstructorEmail
InstructorID
11 Dr. Smith
Alice [email protected]
1
22 Dr. Brown
Bob [email protected]
2