2082 5

BIT253 ยท 2082 ยท 5 marks

Define normalization. Explain first and second form of normalization. [1+4]

Define normalization. Explain first and second form of normalization. [1+4]

Systems Analysis and DesignChapter 6: Data Modeling and Database DesignNormalization definition

Quick answer

Normalization is the process of organizing the attributes and relations of a relational database to minimize data redundancy, eliminate undesirable insertion, deletion, and update anomalies, and ensure data integrity by decomposing larger tables into smaller, well-structured tables based on functional dependencies.

Normalization

Definition


First Normal Form (1NF)

A relation is said to be in First Normal Form (1NF) if:

  • All attributes contain only atomic (indivisible) values (no multi-valued or composite attributes).
  • Each column contains values of a single type.
  • Each row is unique (there is a primary key).
  • There are no repeating groups or arrays in any column.

Example

Not in 1NF (multi-valued attribute):

StudentIDNameCourses
1RamMath, Science
2SitaEnglish

Converted to 1NF:

StudentIDNameCourse
1RamMath
1RamScience
2SitaEnglish

Now each cell holds only one atomic value.


Second Normal Form (2NF)

A relation is said to be in Second Normal Form (2NF) if:

  1. It is already in 1NF, AND
  2. Every non-key attribute is fully functionally dependent on the entire primary key (i.e., there is no partial dependency).

Partial Dependency: A non-key attribute depends on only a part of a composite primary key, not the whole key.

2NF is relevant only when the primary key is composite (made up of two or more attributes).

Example

In 1NF but NOT in 2NF:

StudentIDCourseIDStudentNameCourseNameGrade
1C01RamMathA
1C02RamScienceB
2C01SitaMathA
  • Primary Key: (StudentID, CourseID)
  • StudentName depends only on StudentID (partial dependency)
  • CourseName depends only on CourseID (partial dependency)
  • Grade depends on both StudentID and CourseID (full dependency)

Converted to 2NF (remove partial dependencies):

Student Table:

StudentIDStudentName
1Ram
2Sita

Course Table:

CourseIDCourseName
C01Math
C02Science

Enrollment Table:

StudentIDCourseIDGrade
1C01A
1C02B
2C01A

Now every non-key attribute is fully dependent on the entire primary key.


Summary

Normal FormCondition
1NFNo multi-valued or composite attributes; all values atomic
2NFIn 1NF + No partial dependency on composite primary key

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.