0% found this document useful (0 votes)
11 views5 pages

Normalization of Relational Database

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views5 pages

Normalization of Relational Database

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

NORMALIZATION OF RELATIONAL DATABASE

To avoid data redundancy(duplicate) and inconsistency(mistake).

FIRST NORMAL FORM:

 Each table cell should contain a single value.


 Each record need to be unique.
Now to create First Normal Form create two tables, one is master table having
unique records and in another table having multiple records of same field.

Then create one to many relationship between these two tables.


SECOND NORMAL FORM:

 A relation must be in first normal form.


 Relation must not contain any PARTIAL DEPENDENCY

In the first table Name fully depend on UserId.

In the Second Table Title fully depend on VideoId

Now in third Table make composite key by combining UserId and


VideoId. The need of Composite key is in many to many relationship as
in this example many users can watch many videos.

In the third table Watchtime and WatchedAt fully depend on both UserId and
VideoID because User watched the video on this date and time.

If any attribute depends on any one part of Composite key then it is partial
dependency. For example Email only depends on UserID, Email does not
depend on VideoId.
As there is a rule in Second normal form there should be no partial
dependency, therefore we have to move the Email to First Table because
email fully depend on userId.

THIRD NORMAL FORM:


 A relation is in third normal form, if there is no transitive
dependency for non-prime attributes as well as it is in Second
Normal Form.
 Transitive dependency means any attribute does not depend
directly on primary key . It depends on another field and then
that another field depends on Primary key.

For example Date of Birth depends on Author not on Book Id


and Author depends on BookId which is Primary key.
Now to create Third Normal Form remove this Transitive
dependency by creating two separate table and then create one to
one relationship between these two tables.

Summary:
In all the Normal forms we divide single table into separate tables to
reduce redundancy(duplicate) and inconsistency(mistake).

You might also like