Thursday, October 31, 2019

Database Normalization

In Pega, when we carry out data modelling: it is important to consider what are all database tables that would be needed in the background to store the data.

Key factor to consider in the design is to store the data in the tables without any redundancy. And this is referred to "Normalization". While most of the developers are familiar with the normalization, some of them may not know about it due to various reasons. So this post would help them to essence of normalization which needs to be inline even when working with Pega.

Types of normalization: 1NF, 2NF, 3NF, BCNF, 4NF

It is not mandatory to know normalization concepts. But knowing this would help you design system better. With practical knowledge, over time people would implement normalized database tables (even without knowing these concepts). Reason being: the issues/problems would teach and give a lesson on making every row in the database table more meaningful.

Thumb rules:
  • Every row within a table should make sense and meaningful. Identify primary key of the table. 
  • Every column should contain only single value. Never allow multiple values to reside with comma in a single column, if required have multiple columns.
  • Always try to split data into multiple tables by identifying the appropriate relationships.
  • Establish foreign key relationship between the tables when necessary. Never try to put all the columns into single table. This would end up in bad design.
Note:
In my next post of normalization, I would articulate on the below:

  • real-time example for each normal form w.r.t Pega usecases. 
  • on the problems we would end-up in, if we do not follow normalization.

No comments:

Post a Comment


HowToPega : All rights reserved and the contents are copyrighted to Pavan Kumar Naidu