Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

If the functional depencies are
AB-->CD
BC-->D
IS the relation still in 2NF?,I mean since AB is the key and the 2nd BC,out of which B is part of the key,is the relation still in 2NF??

share|improve this question
    
Can't BC->D be shortened to C->D since AB->C? –  Petter Brodin Jan 19 '13 at 11:05
add comment

2 Answers

Assuming your relation is ABCD and assuming you meant the following functional dependencies:

  • AB-->C
  • BC-->D

Then you need to decompose this relation to get it to third normal form (3NF). This is because D is not determined by the key of ABCD. To bring this to 3NF you need to have two relations: ABC and BCD. Now each non-key attribute is fully dependent on the key of its relation (and nothing else).

share|improve this answer
    
Shouldn't you explain why/how you removed the AB->D dependency? –  ypercube Jan 19 '13 at 13:27
    
@ypercube, I thought about that and thought that it was probably a typo based on short-cutting the listing of the original relation (ABCD). It seemed pretty unlikely that D is determined by both AB and BC. Why not write ABC-->D? I couldn't think of a practical case that met the dependencies as stated. –  Joel Brown Jan 19 '13 at 13:35
    
Oh, I thought you meant that we can derive AB->D from the other 2 dependencies. –  ypercube Jan 19 '13 at 13:36
add comment

From wikipedia, 2nd Normal Form:

Second normal form (2NF) is a normal form used in database normalization. 2NF was originally defined by E.F. Codd in 1971. A table that is in first normal form (1NF) must meet additional criteria if it is to qualify for second normal form. Specifically: a table is in 2NF if and only if it is in 1NF and no non-prime attribute is dependent on any proper subset of any candidate key of the table. A non-prime attribute of a table is an attribute that is not a part of any candidate key of the table.

There is only one candidate key, the AB.

About the other two non-prime attributes, C and D:

  • C depends only on the candidate key AB.

  • D depends on on the candidate key AB and on BC. BC is neither a candidate key nor a proper subset of (the only one) candidate key. (It doesn't matter that B is a subset of the candidate key, because D does not depend on just B.)

So, the relation is in 2NF.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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