- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Check which FD violates 2NF in the given relation and decompose R into 2NF

Normalization is the process of organizing the data in a database. It helps in removing the duplicate values in the database. Normalization divides the large table into smaller tables and links them using relationships.

The normal form is used to reduce redundancy from the database table. Normalization is the name given to the process of simplifying the relationship among data elements in a record.

In simple words we can say,

Normalization is the process of organizing data to minimize.

- Redundancy/duplication/repetition.
- Insertion, deletion, updating anomalies.

## Normal forms

There are six Normal forms which are as follows −

- First Normal Form (1NF)
- Second Normal Form (2NF)
- Third Normal Form (3NF)
- Boyce-Codd Normal Form (BCNF)
- Fourth Normal Form (4NF)
- Fifth Normal Form (5NF)

## Problem

For the given relation R(ABCDE) and F : {A->C, B->DE, D->C}, check which functional dependency (FD) violates the 2NF and decompose R into 2NF.

## Solution

In the 2NF, relation must be in 1NF. In the second normal form all non-key attributes are fully functional dependent on the primary key. A relation is in 2NF when it is in 1NF and there is no partial dependency.

A+ = AC => A is not candidate key

B+= BDEC => B is not candidate key

D+= DC => D is not candidate key

AB+ =ACBDE => AB is a candidate kay

=> key attribute = A,B and non-key attribute = C,D,E.

A->C violates 2NF [since A->C is partial dependency]

B->DE violates 2NF [since B->DE is partial dependency]

D->C is in 2NF [since D->C is not partial dependency]

2NF is decomposed into the following −

We consider the FDs which violate 2NF and they are as follows −

For A->C R(ABCDE0 decomposed to R1(AC) and R2(ABDE)

For B->DE R2(ABDE) decomposes to R3(BDEC) and R4(AB).

=>2NF decomposition of relation R is R1(AC), R3(BDEC), R4(AB).

- Related Questions & Answers
- Check which FD violates 3NF in a given relation and decompose R into 3NF(DBMS)
- Second Normal Form (2NF)
- Explain about 2NF with an example in DBMS
- How to check which packages are loaded in R?
- How to decompose a time series with trend and seasonal components using loess method in R?
- Find nth term of a given recurrence relation in C++
- Find nth term of a given recurrence relation in Python
- What is the relation between auto and decltype in C++?
- C program to find nth term of given recurrence relation
- Check which element in a masked array is less than the given value in Numpy
- Relation between Laplace Transform and Fourier Transform
- Relation among Illumination, Brightness, and Luminous Intensity
- Signals and Systems – Relation between Convolution and Correlation
- How to check which list element contains a particular value in R?
- How to check which value is NA in an R data frame?