Conditions

  • Relations has to be in 2NF
  • No transitive dependencies on the primary key

A relation is in 3NF if at least one of the following condition holds in every non-trivial function dependency X –> Y

  1. X is a super key.
  2. Y is a prime attribute (each element of Y is part of some candidate key).

Violation Example

Student IDStudent NameCourse NameCourse ProfessorProfessor Office Number
1001Alice SmithMath 101Dr. Brown204
1002Bob JohnsonHistory 201Dr. Johnson301
1003Jane DoeEnglish 101Dr. Green203
1004John SmithMath 101Dr. Brown204

Professor Office Number is fully dependent on Course Professor, which is a non-prime attribute, thus Professor Office Number is transitively depending on the primary key Student ID through Course Professor as it is dependent on the primary key. This this a violation of 3NF.