Scroll Top

Introduction to Normalization in Databases

Introduction to Normalization in Databases

Normalization helps remove redundancies in Data Design. The redundancies are removed systematically using a three or four step approach. The four important normal forms are 1NF, 2NF, 3NF and BCNF. This tutorial will cover the first three normal forms.

The three normal forms apply to only Dr Codd’s relational model otherwise referred to as the relational data model.

In the 1st normal form (1NF) multi valued columns are disallowed. If there are multivalued columns such as multiple subjects registered by students in a course registration system or multiple telephone numbers used to call patients in a patients record system they have to be split into multiple records one for each value in the multi valued column. In this form of normalization every record should be able to be identified uniquely and so would entail the use of Primary key.

In the second normal form (2NF) in addition to the database being in the 1st normal form all non key attributes should be functionally dependent only on the primary key. In case of a composite key the non key attributes should be fully dependent on the entire composite key. For example consider the following record system for customers. The following tuple (Customer ID, Order ID, Order Date, Store Location) has the Primary key as Customer ID and Order ID. The two non key attributes are Order Date and Store Location. Here the location of the store does not depend upon the primary key or in other words this non key attribute is not functionally dependent upon the primary key. So this table has to be split into two tables in order to make it in 2NF.

Customer -Order (Customer ID, Order ID, Location ID) Location (Location ID, Location Name).

In the third normal form, the database should be in the second normal form and in addition the normal form ensures that redundancy is further reduced by assuring that every non key attribute does not have any dependency with any other non key attribute or does not have any transitive functional dependency. In popular relational database terminology this translates to that data model having referential integrity constraints enabled in the design.

As an example of a database not in 3NF is the tuple with the attributes (Customer ID, Name, Address line 1, Address line 2, Address line 3, Pincode). This is not in 3NF as the Address line elements depend only on the Pincode)To make this in 3NF we use two tuples Customer and Pincode with the following attributes Customer (Customer ID, Name, Pincode), Pincode (Pincode, Address line 1, Address line 3). Here the Pincode attribute in the customer tuple is the foreign key in the table which matches the Primary key in the Pincode tuple. This translates to what is termed as Referential Integrity constraint where the foreign key in a table corresponds to the Primary key in another table.

#Introduction #Normalization #Databases

Will be pleased to have you visit my pages on social networking .

 Facebook page here.

Twitter account is here.

Linkedin account here

Post byBedewy for info askme VISIT GAHZLY

Related Posts

Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.