DEV Community

Cover image for A brief introduction to Normalization
Pragya Sapkota
Pragya Sapkota

Posted on • Originally published at pragyasapkota.Medium

A brief introduction to Normalization

Normalization is a process of managing and organizing data in a database. To normalize the data, we create tables and establish relationships between the tables. This helps protect the data and make the database flexible because redundancy and inconsistent dependency are eliminated. A normalized database is structured in a way where you can easily add a new type of data or remove the existing one without changing the original arrangement. The applications that interact with the database also remain unaffected for most time when the database is normalized.

Normal Forms

Many normal forms act like guidelines that help you get the database normalized. Let’s look at some of them: -

First Normal Form (1NF)

  • Repeating groups are not authorized.
  • Each set of related data is identified with a primary key.
  • The set of related data should have a separate table.
  • A single column can not have mixed data types.

Second Normal Form (2NF)

  • Should satisfy the first normal form
  • Partial dependency cannot be tolerated

Third Normal Form (3NF)

  • Should satisfy the second normal form.
  • Transitive functional dependencies cannot be tolerated.

Boyce-Codd Normal Form (BCNF)

The third normal form gets stronger in the BCNF where it addresses certain types of anomalies that were not dealt with in the 3NF. That’s why Boyce-Codd normal form is also known as 3.5 Normal Form (3.5NF).

  • Should satisfy the third normal form.
  • For every functional dependency X→Y, X should be the super key.

There are more normal forms like 4NF, 5NF, etc. which we will not discuss right now.

If a relational database meets the third normal form, it is normalized because 3NF excludes the insertion, update, and deletion anomalies. However, perfect compliance cannot be accomplished in a real-world system. For example, if we choose to ignore one of the first three rules to normalize, we need to be ready for problems to occur such as redundant data and inconsistent dependencies.

Advantages of Normalization

  • Data Redundancy is reduced
  • Database design is better
  • Data is more consistent
  • Referential integrity is imposed

Disadvantages of Normalization

  • Though the data design is better, it is complex as well
  • Performance is slower
  • Overhead maintenance
  • More joins are required

GitHub logo pragyaasapkota / System-Design-Concepts

Though the concepts of system design might be tricky, let's see them individually to their core concepts and have a better understanding.

System Design

Systems design is the process of defining elements of a system like modules, architecture, components and their interfaces and data for a system based on the specified requirements.

This is a index for the concepts of system.

If you wish to open these in a new tab, Press CTRL+click

I hope this article was helpful to you.

Please don’t forget to follow me!!!

Any kind of feedback or comment is welcome!!!

Thank you for your time and support!!!!

Keep Reading!! Keep Learning!!!

Top comments (0)