0% found this document useful (0 votes)
4 views

Normalisation Concepts in Database

Uploaded by

gicev99865
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Normalisation Concepts in Database

Uploaded by

gicev99865
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

NORMIZATION IN DATABASE

Normalization is a process in database design aimed at organizing data to minimize redundancy and
dependency. It ensures that each piece of data is stored in the most appropriate place within the
database structure. By breaking down large tables into smaller, more manageable ones and establishing
relationships between them, normalization enhances data integrity and reduces anomalies such as
insertion, update, and deletion anomalies.

PURPOSE AND BENEFITS OF NORMALIZATION:

Normalization serves several critical purposes in database management:

Data Integrity:

One of the primary goals of normalization is to uphold the integrity of the data stored in the database.
By eliminating redundant data and ensuring that each piece of information is stored in only one place,
normalization reduces the risk of inconsistencies and inaccuracies. This helps guarantee that the data
accurately reflects the real-world entities it represents, thereby enhancing the trustworthiness and
reliability of the database.

Efficiency:

Normalization contributes to improved efficiency in database operations. By organizing data into smaller,
well-structured tables and minimizing redundancy, normalization optimizes storage utilization and query
performance. With normalized databases, queries can be executed more quickly and with less overhead,
leading to enhanced system responsiveness and overall performance.

Scalability:

Another significant advantage of normalization is its support for database scalability. As the data
requirements of an organization evolve over time, normalized databases can adapt more easily to
accommodate growth and changes in data volume and complexity. The modular structure of normalized
databases makes it simpler to extend and modify the database schema without introducing significant
disruptions or inefficiencies.

Reduction of Redundancy:

Reducing data redundancy is a key objective of normalization. By storing each piece of data in only one
place and establishing relationships between related data elements through foreign keys, normalization
minimizes the duplication of information within the database. This not only conserves storage space but
also helps prevent inconsistencies that can arise from redundant data.
Anomaly Prevention:

Normalization helps mitigate various types of anomalies that can occur during database operations, such
as insertion, update, and deletion anomalies. By structuring the database schema according to
normalization principles, redundant dependencies and irregularities that could lead to anomalies are
systematically addressed and resolved. This ensures that database operations proceed smoothly and
reliably, without unexpected or undesirable outcomes.

Normal Forms:

Normal forms are rules or guidelines used in database design to ensure that databases are well-
structured, organized, and free from certain types of anomalies. Each normal form represents a level of
organization for relational database tables, with higher normal forms indicating stricter adherence to
normalization principles. The primary goal of normal forms is to minimize data redundancy, dependency,
and anomalies, thereby promoting data integrity and efficiency in database operations.

NORMAL FORMS

1. First Normal Form (1NF):

 1NF ensures that the table structure is simple and that it does not contain any repeating
groups of data. Specifically, it requires that:
 Each column in the table contains atomic values, meaning that each cell contains
only a single value and cannot be further divided.
 Each column has a unique name.

Example: Consider a table storing information about students and their courses:

Student id student name Course


101 John Maths, physics
102 Alice Chemistry, biology
103 bob maths

This table violates 1NF because the "Courses" column contains multiple values in some cells,
creating a repeating group. To normalize it into 1NF, we split the table into two separate
tables:

Table 1: students

Student ID Student name


101 John
102 Alice
103 Bob

Table 2: courses

Student ID Course
101 Maths
101 Physics
102 Chemistry
102 Biology
103 Maths

Now, each table adheres to 1NF, with atomic values in each column.

2. Second Normal Form (2NF):


 A table is in 2NF if it is in 1NF and all non-key attributes are fully dependent on the
primary key. This means that every attribute in the table should be functionally
dependent on the entire primary key, not just a part of it. Specifically, it requires that:
 The table is in 1NF.
 All non-key attributes are functionally dependent on the entire primary key.

Example: Consider a table containing information about sales orders:

Order ID Product ID Product name Quantity


1 101 Laptop 2
1 102 Mouse 3
2 101 laptop 1

In this table, "Product Name" is functionally dependent on "Product ID," which is part of the
composite primary key. However, "Quantity" is also functionally dependent on "Product ID," not just
the entire primary key (Order ID, Product ID). To normalize it into 2NF, we split the table into two:

Table 1: Orders

Order ID Product ID
1 101
1 102
2 101

Table 2: Products

Product ID Product Name


101 Laptop
102 Mouse
Now, each table follows to 2NF, with non-key attributes fully dependent on the primary key.

3. Third Normal Form (3NF):


 3NF builds upon 2NF by eliminating transitive dependencies. Specifically, it requires that:
 The table is in 2NF.
 There are no transitive dependencies, meaning that non-key attributes are not
dependent on other non-key attributes.

Example: Consider a table containing information about employees and their departments:

Employee ID Employee name Department ID Department name


101 John 1 HR
102 Alice 2 IT
103 Bob 1 HR

In this table, "Department Name" is functionally dependent on "Department ID," which is part of
the primary key. However, "Employee Name" is functionally dependent on "Employee ID," which
is not the primary key. To normalize it into 3NF, we split the table into two:

Table1: Employees

Employee ID Employee name Department ID


101 John 1
102 Alice 2
103 Bob 1

Table2: Departments

Department ID Department name


1 HR
2 IT

Now each table follows the rules of 3NF, with no transitive dependency.

4. Boyce-Codd Normal Form (BCNF):


 BCNF is a stricter form of 3NF, where every determinant (attribute that determines another
attribute) must be a candidate key. This ensures that there are no non-trivial functional
dependencies between attributes.

Example: Consider a table with attributes A, B, and C, where A determines B and B determines C:

A B C
1 2 3
4 5 6

There are higher normal forms beyond BCNF, such as Fourth Normal Form (4NF), Fifth Normal Form
(5NF), and Domain-Key Normal Form (DK/NF), but they are less commonly discussed in practice. Each
normal form imposes additional constraints on the database schema, leading to more rigorous
organization and reduced data redundancy. However, achieving higher normal forms may also require
more complex database designs and trade-offs in terms of performance and maintainability.

IN CONCLUSION

Normalization ensures that databases are efficiently structured to minimize redundancy, dependency,
and anomalies, thereby enhancing data integrity and efficiency in database operations. It promotes
scalability and reliability by organizing data systematically and eliminating unnecessary duplication,
making it an essential concept in database design and management.

You might also like