0

Tomorrow I have my final exam of Database Design but I have a doubt about the Second Normal Form (2NF).

The definition says a relation is in 2NF if no non-prime attribute is partially dependent on a key.

My doubt is about if a relation could be in 2NF is if has attributes that are fully dependent on a key but transitively.

For example: R (A,B,C,D) with AB key and FD ( AB->C,C->D)

In this case the non-prime attribute C is fully dependent on the key so it meets the condition but in the case of the attribute D I don´t know if it meets the rule. D is dependent on C and due to C is fully dependent on the key,does it mean that D is fully dependent on the key being this relation in 2NF?

2 Answers 2

2

The important thing about the 2NF is that in each (non trivial) dependency the determinant should not be a proper subset of a key. In the example, the determinant of AB->C is the full key, while the determinant of C->D is C, which is no part of any key. So the schema is obviously in 2NF.

0

What you're referring to would be a violation of 3NF which requires you to eliminate all transitive dependencies, which is what you have described. Thus, your situation does not violate 2NF.

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.