in Databases
1,426 views
4 votes
4 votes
If A Relation R(A,B,C,D)  and CK given is (AB,C)

and FD is given as A->C

 

Then the relation is in which highest normal form?
in Databases
1.4k views

4 Comments

I think the candidates key should be {A,C}

because of FD A->C

not {AB, C}
0
0
@Anirudh

U mean there must be one dependency

ABC->D

So, there should not be any partial dependency

As both dependency from prime to prime attribute.

Partial dependency valid for prime to non prime attribute

So, in 3NF

but not in BCNF as here D is not a prime attribute
0
0
edited by
No A and C are not Candidate Key Don't assume candidate key We have candidate key which is given But if u need to find candidate key then it should be ABD and it should be 1NF because it follows 3NF condition but not 2NF

Correct me if i wrong
0
0

4 Answers

2 votes
2 votes
2NF because there is no FD for which the nonprime attribute is not fully functionally dependent on the primary key.

3NF because there is no FD for which a nonprime attribute is transitively dependent on primary key.

 

NOT 4NF because for every non-trivial FD LHS must be a super key which is not in this case
2 votes
2 votes
3 nf.....

as candidate keys are ab and c so

all the functional dependency would be like candidate key to non prime attributes or prime attributes to prime attributes.
1 vote
1 vote
If the candidate keys are
AB, C
then the dependencies would be

AB->CD
C->ABD
And
A->C      (Given)
 

Now here every non prime attribute(D) is non transitively dependent on EVERY  Key attribute of R i.e. (AB , C)

Therefore it is in 3NF
0 votes
0 votes
1NF because no transitive partial dependency and Not 2NF
edited by

4 Comments

CK {AB, C}

FD is given as A->C

since, A determine C without B, so AB should not be a candidate key instead it is super key.

Consider

R(A,B,C,D)  with FD's = {A->C, B-> D, C->ABD}

In this relation C is CK and since A->C, A is also the CK,

this relation is in 2NF not in 3NF.
0
0
edited by

Candidate Key: The minimal set of attribute which can uniquely identify a tuple is known as candidate key 

Reference :-http://www.geeksforgeeks.org/dbms-keys-candidate-super-primary-alternate-and-foreign/

R(A,B,C,D)

A->C

I m assuming u r right If A is candidate key closure( A )should be ABCD 

but A+ = AC so A should not be key that's why candidate key is given But Suppose for ur choice if We find Candidate key 

Then it should be ABD not A because (ABD)+ = ABCD so According to ABD , prime attributes are A,B,D 

Lets Find Highest Normal Form now :-

1-Not BCNF because A is not key 

2-Non prime Attribute is C and C is not dependent on Non Prime attribute so 3 NF but it is not following 2NF condition so 1NF

Hence 1 NF @Shubhanshu

0
0
edited by

but A= AC so A should not be key that's why candidate key is given But Suppose for ur choice if We find Candidate key 

It is not, Closure(A) = {A,C}

But it should be, 

Closure(A) =  {A UNION Closure(C)}

Beside, this question we usually use the above method to find the candidate keys of Relation.

Suppose consider a relation, R(A,B,C,D,E)

A->B, B->C, C->D, D->E.

then

closure(A) = { A UNION closure(B)} from below Closure(A) = {A, B, C, D, E}

Closure(B) = {B UNION Closure(C)} from below Closure(B) = {B, C, D, E}

Closure(C) = {C UNION Closure(D) from below Closure(C) = {C ,D, E}

Closure(D) = {D UNION Closure(E)} from below Closure(D) = {D, E}

Closure(E) = {E}

this is how we calculate the closure,

Coming to given question again,

since, A -> C

Closure(A) =  {A UNION Closure(C)}

Now, C is the CK of the relation so definitely its should be {A, B, C, D}

and hence the Closure(A) = {A, B, C, D}

That's why I am saying A is also CK of the relation and AB is not CK it is SK.

Since, A and C are the only CK of the relation R, which are also simple CK { CK with one attribute}, So, R is in 2NF for sure, may or may not in 3NF.

0
0