CS FundamentalsModerateAccenture · Capgemini pattern

A poorly designed table stores repeating groups as separate columns: Student(sid, sname, course1, course2, course3). What specific 1NF violation does this exhibit, and what is the standard fix?

  1. A. It violates 4NF only, not 1NF
  2. B. It violates referential integrity, which is unrelated to normal forms
  3. C. It isn't actually a 1NF violation, since every column still holds a single value
  4. D. It violates 1NF's spirit of a fixed, known set of atomic columns representing a repeating multivalued fact (a student's courses) as several ad hoc columns instead of separate rows; the fix is to create a separate Enrollment(sid, course) table with one row per (student, course) pair

Correct answer: D. It violates 1NF's spirit of a fixed, known set of atomic columns representing a repeating multivalued fact (a student's courses) as several ad hoc columns instead of separate rows; the fix is to create a separate Enrollment(sid, course) table with one row per (student, course) pair

Although each course1/course2/course3 cell holds a single atomic value, encoding a variable, repeating multivalued fact as a fixed, arbitrary number of columns is exactly the 'repeating group' anti-pattern 1NF is meant to rule out: it caps the number of courses, wastes space with unused columns, and makes queries like 'which students take course X' awkward. The fix is a separate table with one row per (student, course) pair.

More DBMS and SQL questions

Exams that ask this topic