0% found this document useful (0 votes)
8 views5 pages

Understanding Database Normalization Types

normalization and it's types

Uploaded by

johnlimer08
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views5 pages

Understanding Database Normalization Types

normalization and it's types

Uploaded by

johnlimer08
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Normalization and Its Types

Introduction

• Normalization is the process of organizing data in a database to reduce redundancy


and improve data integrity.

• It involves dividing large tables into smaller, related tables and defining relationships
between them.

• Proposed by E. F. Codd (the father of relational databases).

Objectives of Normalization:

1. Eliminate data redundancy (duplicate data).

2. Ensure data dependencies are logical.

3. Improve efficiency and consistency.

4. Make database flexible for future modifications.

Types of Normalization

1. First Normal Form (1NF)

• Rule: Each column must contain atomic (indivisible) values. No repeating groups or
arrays.

• Example (Before 1NF):

StudentID Name Subjects

1 Rahul Math, Physics

2 Priya Chemistry, Math

Problem: Subjects column has multiple values.

• After 1NF:

StudentID Name Subject

1 Rahul Math

1 Rahul Physics

2 Priya Chemistry
StudentID Name Subject

2 Priya Math

✔ Each column is atomic.

2. Second Normal Form (2NF)

• Rule: Must be in 1NF and all non-key attributes should be fully dependent on the
primary key (no partial dependency).

• Example (Before 2NF):

StudentID CourseID CourseName

1 C1 DBMS

2 C2 OS

Problem: CourseName depends only on CourseID, not on the whole key (StudentID,
CourseID).

• After 2NF: Split into two tables:

StudentCourse Table

StudentID CourseID

1 C1

2 C2

Course Table

CourseID CourseName

C1 DBMS

C2 OS

✔ No partial dependency.

3. Third Normal Form (3NF)

• Rule: Must be in 2NF and no transitive dependency (non-key attribute should not
depend on another non-key attribute).
• Example (Before 3NF):

EmpID EmpName DeptID DeptName

101 John D1 HR

102 Smith D2 IT

Problem: DeptName depends on DeptID (which is a non-key).

• After 3NF: Split into two tables:

Employee Table

EmpID EmpName DeptID

101 John D1

102 Smith D2

Department Table

DeptID DeptName

D1 HR

D2 IT

✔ Removed transitive dependency.

4. Boyce–Codd Normal Form (BCNF)

• Rule: A stricter version of 3NF. For every functional dependency (X → Y), X should be
a super key.

• Example (Before BCNF):

Course Teacher Book

DBMS A DB_Book

OS B OS_Book

DBMS C DB_Book

Here, a course can be taught by multiple teachers, but the book depends only on
Course (not on the whole key).
• After BCNF: Split into:

CourseBook Table

Course Book

DBMS DB_Book

OS OS_Book

CourseTeacher Table

Course Teacher

DBMS A

DBMS C

OS B

✔ Dependency issue resolved.

5. Fourth Normal Form (4NF)

• Rule: Must be in BCNF and should not have multi-valued dependencies.

• Example (Before 4NF):

Student Course Hobby

Rahul DBMS Cricket

Rahul DBMS Music

Rahul OS Cricket

Rahul OS Music

Multi-valued dependency: Rahul has many courses and many hobbies.

• After 4NF: Split into:

StudentCourse Table

Student Course

Rahul DBMS
Student Course

Rahul OS

StudentHobby Table

Student Hobby

Rahul Cricket

Rahul Music

✔ Multi-valued dependencies removed.

6. Fifth Normal Form (5NF) / Project-Join Normal Form (PJNF)

• Rule: Must be in 4NF, and should not have join dependency.

• It ensures that a table cannot be decomposed further without losing information.

• Example: Used in complex many-to-many relationships, like splitting a Supplier–


Part–Project relation into three smaller relations without redundancy.

Conclusion

• Normalization is essential to create an efficient, reliable, and flexible database.

• Each normal form removes a specific type of redundancy.

• Higher normal forms (BCNF, 4NF, 5NF) are applied for more complex systems where
data anomalies must be minimized.

Common questions

Powered by AI

Higher normal forms such as BCNF, 4NF, and 5NF are designed to handle more complex systems where simple elimination of redundancy (as achieved in lower normal forms) is insufficient. They address intricate issues like multipath and join dependencies, ensuring data anomalies and redundancy are minimized even in highly interconnected and complex data structures. These forms enforce stricter dependencies and integrity rules, accommodating complex many-to-many relationships without information loss .

The primary objective of normalization is to organize data to reduce redundancy and improve data integrity. Normalization helps by dividing large tables into smaller, related tables and defining clear relationships between them, which eliminates duplicate data and ensures logical data dependencies. This process increases the database's efficiency, consistency, and flexibility for future modifications .

Third Normal Form (3NF) eliminates transitive dependency by ensuring that non-key attributes are only dependent on the primary key, not on other non-key attributes. This is important because transitive dependency can lead to anomalies where changes to non-key attributes affect other non-key attributes. By restructuring tables to remove dependencies like DeptName depending on DeptID, 3NF maintains database integrity and efficiency .

Partial dependency occurs when non-key attributes depend on only part of a composite primary key rather than the whole key. Second Normal Form (2NF) addresses this issue by requiring a database to be in 1NF and ensuring that all non-key attributes are fully dependent on the primary key, thereby eliminating partial dependency. This is achieved by splitting tables to isolate attributes like CourseName that depend only on CourseID, separating them from the StudentCourse table .

A multi-valued dependency occurs when one attribute in a table uniquely determines another attribute, and both these attributes can take multiple values independently of each other. Fourth Normal Form (4NF) addresses multi-valued dependencies by requiring that tables in BCNF should not have such dependencies. This is done by splitting data into separate tables to ensure that a single table entry has only one value for each attribute, such as separating courses and hobbies into distinct tables .

E. F. Codd, known as the father of relational databases, introduced the concept of normalization to enhance data integrity and efficiency in database systems. His work laid the foundational principles for organizing data in a way that reduces redundancy and ensures logical consistency. These concepts have profoundly impacted relational database design, leading to more reliable, flexible systems that meet the demands of complex data manipulations and storage with minimal anomalies and inefficiencies .

Boyce–Codd Normal Form (BCNF) is a stricter version of 3NF, requiring that for every functional dependency X → Y, X must be a super key. While 3NF removes transitive dependency, BCNF goes further by requiring that dependencies involve only super keys. For example, in a table where a course book depends only on Course and not on the entire Course-Teacher key, BCNF corrects this by restructuring the tables to clarify the dependencies, ensuring no anomalies arise .

Fifth Normal Form (5NF) is significant for databases with complex many-to-many relationships because it focuses on eliminating join dependencies which might arise during table decomposition. It ensures that a table cannot be further decomposed without losing data integrity. This is particularly important in complex systems where multiple elements are interconnected, such as in Supplier-Part-Project relationships, preventing redundancy and maintaining information accuracy without data loss .

The objectives of database normalization, which include eliminating redundancy, ensuring logical data dependencies, and improving efficiency, align with the need for database flexibility by creating a robust structure that can easily accommodate future modifications. By organizing data into well-defined, smaller tables with clear relationships, normalization allows for easier maintenance and updates, preserving integrity and performance as changes occur .

First Normal Form (1NF) improves data atomicity by ensuring that each column contains atomic (indivisible) values and eliminating repeating groups or arrays. This solves the problem of having columns with multiple values, which can lead to complexity and redundancy. For instance, a 'Subjects' column that stores 'Math, Physics' would be split into two separate, atomic entries in 1NF .

You might also like