Normals Forms in DBMS

Normal Forms

Description of Normal Forms

First Normal Form (1NF)

A relation is in first normal form if every attribute in that relation is single-valued attribute. 

Second Normal Form (2NF)

A relation that is in First Normal Form and every non-primary-key attribute is fully functionally dependent on the primary key, then the relation is in Second Normal Form (2NF).

Third Normal Form (3NF)

A relation is in the third normal form, if there is no transitive dependency for non-prime attributes as well as it is in the second normal form. A relation is in 3NF if at least one of the following conditions holds in every non-trivial function dependency X –> Y.

  • X is a super key.
  • Y is a prime attribute (each element of Y is part of some candidate key).

Boyce-Codd Normal Form (BCNF)

For BCNF the relation should satisfy the below conditions

  • The relation should be in the 3rd Normal Form.
  • X should be a superkey for every functional dependency (FD) X−>Y in a given relation. 

Fourth Normal Form (4NF)

A relation R is in 4NF if and only if the following conditions are satisfied: 

Fifth Normal Form (5NF)

 A relation R is in 5NF if and only if it satisfies the following conditions:

  • R should be already in 4NF. 
  • It cannot be further non loss decomposed (join dependency).

Introduction of Database Normalization

Normalization is an important process in database design that helps improve the database’s efficiency, consistency, and accuracy. It makes it easier to manage and maintain the data and ensures that the database is adaptable to changing business needs.

Similar Reads

What is Database Normalization?

Database normalization is the process of organizing the attributes of the database to reduce or eliminate data redundancy (having the same data but at different places). Data redundancy unnecessarily increases the size of the database as the same data is repeated in many places. Inconsistency problems also arise during insert, delete, and update operations....

What is Functional Dependency and its Types?

Functional Dependency is a constraint between two sets of attributes about a database. A function dependency A -> B means for all instances of a particular value of A, there is the same value of B. For example in the below table, A -> B is true, but B -> A is not true as there are different values of A for B = 3....

Advantages of Functional Dependency

The database’s data quality is maintained using it.  It communicates the database design’s facts.  It aids in precisely outlining the limitations and implications of databases.  It is useful to recognize poor designs.  Finding the potential keys in the relationship is the first step in the normalization procedure. Identifying potential keys and normalizing the database without functional dependencies is impossible....

Why do we need Normalization?

The primary objective for normalizing the relations is to eliminate the below anomalies. Failure to reduce anomalies results in data redundancy, which may threaten data integrity and cause additional issues as the database increases. Normalisation consists of a set of procedures that assist you in developing an effective database structure....

Features of Database Normalization

Elimination of Data Redundancy: One of the main features of normalization is to eliminate the data redundancy that can occur in a database. Data redundancy refers to the repetition of data in different parts of the database. Normalization helps in reducing or eliminating this redundancy, which can improve the efficiency and consistency of the database. Ensuring Data Consistency: Normalization helps in ensuring that the data in the database is consistent and accurate. By eliminating redundancy, normalization helps in preventing inconsistencies and contradictions that can arise due to different versions of the same data. Simplification of Data Management: Normalization simplifies the process of managing data in a database. By breaking down a complex data structure into simpler tables, normalization makes it easier to manage the data, update it, and retrieve it. Improved Database Design: Normalization helps in improving the overall design of the database. By organizing the data in a structured and systematic way, normalization makes it easier to design and maintain the database. It also makes the database more flexible and adaptable to changing business needs. Avoiding Update Anomalies: Normalization helps in avoiding update anomalies, which can occur when updating a single record in a table affects multiple records in other tables. Normalization ensures that each table contains only one type of data and that the relationships between the tables are clearly defined, which helps in avoiding such anomalies. Standardization: Normalization helps in standardizing the data in the database. By organizing the data into tables and defining relationships between them, normalization helps in ensuring that the data is stored in a consistent and uniform manner....

Normals Forms in DBMS

Normal Forms Description of Normal Forms First Normal Form (1NF) A relation is in first normal form if every attribute in that relation is single-valued attribute.  Second Normal Form (2NF) A relation that is in First Normal Form and every non-primary-key attribute is fully functionally dependent on the primary key, then the relation is in Second Normal Form (2NF). Third Normal Form (3NF) A relation is in the third normal form, if there is no transitive dependency for non-prime attributes as well as it is in the second normal form. A relation is in 3NF if at least one of the following conditions holds in every non-trivial function dependency X –> Y. X is a super key. Y is a prime attribute (each element of Y is part of some candidate key). Boyce-Codd Normal Form (BCNF) For BCNF the relation should satisfy the below conditions The relation should be in the 3rd Normal Form. X should be a superkey for every functional dependency (FD) X−>Y in a given relation.  Fourth Normal Form (4NF) A relation R is in 4NF if and only if the following conditions are satisfied:  It should be in the Boyce-Codd Normal Form (BCNF). The table should not have any Multi-valued Dependency. Fifth Normal Form (5NF)  A relation R is in 5NF if and only if it satisfies the following conditions: R should be already in 4NF.  It cannot be further non loss decomposed (join dependency)....

Different Types of Keys Used in Database

Candidate Key Primary Key Super Key Alternate Key Foreign Key Composite Key...

Advantages of Normalization

Normalization eliminates data redundancy and ensures that each piece of data is stored in only one place, reducing the risk of data inconsistency and making it easier to maintain data accuracy. By breaking down data into smaller, more specific tables, normalization helps ensure that each table stores only relevant data, which improves the overall data integrity of the database. Normalization simplifies the process of updating data, as it only needs to be changed in one place rather than in multiple places throughout the database. Normalization enables users to query the database using a variety of different criteria, as the data is organized into smaller, more specific tables that can be joined together as needed. Normalization helps ensure that the database can scale to meet future needs by reducing data redundancy. Normalization can help ensure that data is consistent across different applications that use the same database, making it easier to integrate different applications and ensuring that all users have access to accurate and consistent data....

Disadvantages of Normalization

Normalization can result in increased performance overhead due to the need for additional join operations and the potential for slower query execution times. Normalization can result in the loss of data context, as data may be split across multiple tables and require additional joins to retrieve. Proper implementation of normalization requires expert knowledge of database design and the normalization process.  Normalization can increase the complexity of a database design, especially if the data model is not well understood or if the normalization process is not carried out correctly...

Frequently Asked Questions on Database Normalization – FAQs

When should I denormalize a database?...