www-tutorialspoint-com-normal-forms-in-dbms
www-tutorialspoint-com-normal-forms-in-dbms
Login
Normalization is a process of organizing data in a database to reduce redundancy and improve data consistency. Primary
keys are really important in organizing information in a database. They help to make sure that every row in a table has a
unique identification so that nothing gets mixed up or lost.
In this article, we will discuss the different normal forms of database normalization.
DBMS Tutorial
Normalization
DBMS - Home
Normalization is a process of organizing the data in database to avoid data redundancy, insertion anomaly, update
anomaly & deletion anomaly.
DBMS - Overview
DBMS - Architecture
Relational Model
DBMS- SQL Overview Normalization is the process of organizing data in a database to minimize redundancy and dependency. In database
design, there are different normal forms based on the primary keys of a table. These include −
Relational Database Design
3 Michael 555-5555
Backup and Recovery
DBMS - Data Backup This violates 1NF because the Phone Numbers column contains repeating groups.
To normalize this table to 1NF, we can split the Phone Numbers column into separate rows and add a separate primary
DBMS - Data Recovery key column −
1 John 555-1234
DBMS - Quick Guide
1 John 555-5678
DBMS - Useful Resources
2 Jane 555-9876
DBMS - Discussion
3 Michael 555-5555
Example
A table is in 2NF if each non-primary key column is fully functionally dependent on the primary key. For example, a table
that lists orders and their line items:
1 1 John 1 Shirt 2
1 1 John 2 Pants 1
2 2 Jane 1 Shirt 1
2 2 Jane 3 Hat 3
This violates 2NF because the Customer Name column depends on only part of the primary key (Customer ID). To
normalize this table to 2NF, we can split it into two tables −
1 1 1 2
1 1 2 1
2 2 1 1
2 2 3 3
1 John
2 Jane
Example
To explain 3NF further, let's consider an example of a table that lists customer orders −
Order ID Customer ID Customer Name Customer City Order Date Order Total
In this example, the non-primary key column "Customer City" is transitively dependent on the primary key. That is, it
depends on "Customer ID", which is not part of the primary key, instead of depending directly on the primary key "Order
ID". To bring this table to 3NF, we can split it into two tables −
Table 1: Customers
Table 2: Orders
Now, the "Customer City" column is no longer transitively dependent on the primary key and is instead in a separate
table that has a direct relationship with the primary key. This makes the table 3NF-compliant.
Example
A table is in BCNF if each determinant is a candidate key. In other words, every non-trivial functional dependency in the
table must be on a candidate key. For example, consider a table that lists information about books and their authors −
Table: Books
In this example, the functional dependency between "Author ID" and "Author Name" violates BCNF because it is not on a
candidate key. To bring this table to BCNF, we can split it into two tables −
Table 1: Authors
Table 2: Books
Now, the "Author Name" and "Author Nationality" columns are not transitively dependent on the primary key, and the
table is in BCNF.
For example, a table that lists orders and their products, with columns for order ID, product ID, and product details,
violates 4NF because the product details depend on the combination of order ID and product ID.
Example
In this table, the product name and description depend on both the order ID and product ID, creating a multi-valued
dependency. To bring the table into 4NF, we can split it into three tables −
Order ID Product ID
1 100
1 200
2 100
2 300
3 200
3 300
100 Widget
200 Widget
300 Thing
Disadvantages of Normalization
Increased Complexity
Over-Normalization
Conclusion
So, we have explained the concept of normalization in database management systems (DBMS) and its importance in data
management. We covered different normal forms of database normalization, including 1NF, 2NF, 3NF, BCNF, and 4NF.
We explained how normalization helps eliminate data redundancy, insertion, update, and deletion anomalies. We have
also provided examples of tables in different normal forms and how to normalize them to the desired normal form. We
have written about the importance of normalization in ensuring data consistency and accuracy in DBMS.
Mithlesh Upadhyay
Related Articles
Which normal form is the highest that satisfies the functional dependencies(DBMS)?
Deadlocks in DBMS
Cascadeless in DBMS
Checkpoints in DBMS
Constraints in DBMS
Cursors in DBMS
Advertisements
Annual Membership Training for a Team
Enjoy unlimited access on 5500+ Hand Affordable solution to train a team and
Picked Quality Video Courses make them project ready.