0

I was doing homework for DB class.

One of the questions bugs me out even though I got the answer(I think)..

Question was simple.

FOR GIVEN RELATION R(A,B,C,D,E) and Functional dependencies F(AB -> C, D->E, DE ->B)

1. IS R IN 2NF?

2. IS R IN 3NF?

3. IS R IN BCNF?

I thought since there's no A and D on right-hand side of all FDs in F, A and D must be part of Candidate keys.

So I checked the Closure of AD, and I got AD+ : {A,B,C,D,E}.

That means that AD is super key.

Also, since both A and D must be part of Candidate key and AD cannot be reduced(no closure of subset of AD is {A,B,C,D,E}), AD is a candidate key and only possible candidate key. (Am I doing this right?)

With candidate key AD, D->E is partial dependence on candidate key AD.

So it violates the condition of 2NF.

On DE -> B, is this FD is violating 2NF?

If that's true then..

Is it violating because we can get D->DE from D->E . so DE -> B is equivalent to D -> B. Is this D->B is violating 2NF ??

OR

DE->B itself violates the 2NF without any conversion because of D on left-hand side?

It really confuses me when XY -> Z X is part of Candidate key and Y,Z is non-prime key.

Because I can't say it is violating 2NF or not. I think it is violating 2NF but I can't say why clearly.

I've been looking for examples and explanations and clips for hours but I haven't got any satisfying answer.

It's okay if I don't care specific reason and just want credit . But I can't bare myself with that kind of attitude.

  • Show the steps of your work following your textbook with justification & ask 1 specific researched non-duplicate question re the first place you are stuck. Otherwise an answer is just rewriting your textbook while guessing where you have misconceptions. Please see [ask], hits googling 'stackexchange homework' & the voting arrow mouseover texts. – philipxy May 13 '20 at 17:24
  • Your "I have these FDs" doesn't make sense. "These are all the FDs that hold"?--Not possible. "These are all the non-trivial FDs that hold"?--Not possible. "These are some FDs that hold"?--Question can't be answered. Find out what a *cover* is & what the exact conditions are to apply a particular definition/rule/algorithm. To determine CKs & NFs we must be given FDs that form a cover. Sometimes a minimal/irreducible cover. And the set of all attributes must given. [See this answer.](https://stackoverflow.com/a/53386492/3404097) – philipxy May 13 '20 at 17:25

1 Answers1

1

Also, since both A and D must be part of Candidate key and AD cannot be reduced(no closure of subset of AD is {A,B,C,D,E}), AD is a candidate key and only possible candidate key. (Am I doing this right?)

Yes

Is this D->B is violating 2NF ?

Yes, since B is a non prime attribute and D is part of a candidate key and the dependency holds, since it is implied by D -> E and DE -> B (in a relation in 2NF dependencies where the determinant is a proper subset of a candidate key and the determinant is a non-prime attribute cannot hold).

Renzo
  • 26,848
  • 5
  • 49
  • 61