patternMinor
Is a relation R(A,B,C) with functional dependencies {AB->C, C->B} in BCNF?
Viewed 0 times
withbcnffunctionalrelationdependencies
Problem
If not, then how do I make it BCNF while being lossless and dependency preserving?
I can see that the primary key of R is AB. And in BCNF every functional dependency should be of the form [Key] -> [Key or Non-key]. But C->B doesn't satisfy that.
I know I will lose the AB->C dependency if I do any decomposition. But I am unable to figure out which decomposition would be lossless. I would be grateful if someone could help me out.
I can see that the primary key of R is AB. And in BCNF every functional dependency should be of the form [Key] -> [Key or Non-key]. But C->B doesn't satisfy that.
I know I will lose the AB->C dependency if I do any decomposition. But I am unable to figure out which decomposition would be lossless. I would be grateful if someone could help me out.
Solution
Given AB->C, C->B we can infer only that AB and AC are keys. It follows that C is not a superkey and therefore R does not satisfy BCNF.
The following is a possible decomposition that would satisfy BCNF
The following is a possible decomposition that would satisfy BCNF
R1{A,B} KEY {A,B}
R2{A,C} KEY {A,C}
R3{C,B} KEY {C}Code Snippets
R1{A,B} KEY {A,B}
R2{A,C} KEY {A,C}
R3{C,B} KEY {C}Context
StackExchange Database Administrators Q#159041, answer score: 3
Revisions (0)
No revisions yet.