0
$\begingroup$

Consider a relation R(A,B,C,D,E) and the only FDs,

ABD->C

BC->D

CD->E

These are the only 3 FDs. I want to know if the above relation is in 2NF or not.

According to the definition of 2NF, a relation to be in 2NF, it should be in 1NF and it should not have partial dependency.

But I'm not getting the partial dependency concept.

Somewhere it's written that when a proper subset of a key determines a non-prime attribute then it is partial dependency.

Somewhere it's written that when a prime attribute which is not a key determines a non-prime attribute then it is partial dependency.

Because of these 2 different definitions I'm getting confused.

Please help.

$\endgroup$
6
  • $\begingroup$ Same comments apply after your edit, please act on them. How to Ask help center Computer Science Meta Meta Stack Exchange $\endgroup$
    – philipxy
    Jan 21, 2021 at 14:27
  • $\begingroup$ All your definitions are wrong. What is your textbook name & edition? (Though they can be very poor.) PS "These are the only 3 FDs." cannot be. When some FDs hold, others do--per Armstrong's axioms. Others might hold too. To determine CKs & NFs we must be given FDs that form a cover. And the set of all attributes. See this answer. PS "1NF" has many meanings. What's yours? PS Partial Dependency (Databases) PS Ask 1 question, re where you're 1st stuck. $\endgroup$
    – philipxy
    Jan 21, 2021 at 14:50
  • $\begingroup$ @philipxy I'm referring books of Henry Korth and Ramakrishnan. $\endgroup$ Jan 21, 2021 at 14:57
  • 1
    $\begingroup$ Please clarify via edits, not comments. Please put what is need to ask in your post including quotes. Please ask exactly 1 clear specific researched non-duplicate question. PS Name & edition & quotes. $\endgroup$
    – philipxy
    Jan 21, 2021 at 15:09
  • $\begingroup$ The definition of partial FD in Korth et al is correct. The definition in Ramakrishnan et al is not complete; they only tell you when a FD of the form set->attribute that violates 3nf is partial. (Their definition of transitive FD has the same problem.) (The definition of transitive FD in Korth et al is not complete; they only tell you when a FD of the form set->attribute is transitive.) Pick a textbook & follow it. $\endgroup$
    – philipxy
    Jan 22, 2021 at 5:36

1 Answer 1

0
$\begingroup$

Second normal form means that each non prime attribute must not depend on a proper subset of a candidate key.

In your example, assuming that the given FDs are a cover of the FDs of the relation, you have two candidate keys, ABC and ABD. Moreover, the attribute E depends on BC, which is a proper subset of the candidate key ABC (you can verify this by computing the closure of BC, BC+, and see that E belongs to that closure).

So the relation is not in 2NF.

$\endgroup$
1
  • $\begingroup$ Thank you so much $\endgroup$ Jan 21, 2021 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.