0
1.8kviews
Explain 1NF, 2NF, 3NF, BCNF dependency diagram
1 Answer
0
23views

1] Modify the database so that employee sachin now lives in Mumbai.

update employee

set city = Mumbai

where empname = 'sachin'

2] Find no of employees in each city with date of joining as Aug-2017.

select count (emp name)

from employee

where date of joining = ' 01 Aug-2017'

group by city.

3] Find name of companies starting with letter A.

Select company name

from company

where company-nam " A% "

4] Display employee name manager name city of those employee whose date of joining is greater than 01-01-

Select empname, manager name, city

from employee

where date of join > '01-01-2014'

enter image description here

Given relations are

A B $\rightarrow$ C D E F G

C $\rightarrow$ B

A $\rightarrow$ D

E $\rightarrow$ G

1NF - Candidate lays are A, B assuming that it is in 1NF.

2NF - Relation is not in 2NF as partial dependency exist.

enter image description here

enter image description here

AB $\rightarrow$ C E F G

C $\rightarrow$ B

E $\rightarrow$ G

3NF - Looking at FD, Relation $R_1$ is not in 3NF but $R_2$ is in 3NF, Decomposing relation as:

enter image description here

B CNF - Looking at FD $R_11$ is not in B CNF.

enter image description here

Dependency diagram.

enter image description here

Please log in to add an answer.