Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago .I've already read a bunch of other threads involving BCNF on SO, but I'm still a bit confused about how I would write a function to determine if a relation was in BCNF given the relation and a list of its functional dependencies. So obviously if the union of all inputs and outputs of the FD's don't equal the relation, then it's not in BCNF, but that's also obviously all I need to check.
So, say I'm given an input: R(A,B,C,D,E,F,G) A->B C,D->F G->E
Then what would I need to check to determine if it's BCNF?
asked Oct 8, 2016 at 6:01
77 1 1 gold badge 1 1 silver badge 10 10 bronze badges
A relation is in BCNF if and only if each functional dependency X → Y has a determinant ( X ) which is a superkey, that is, it determines all the other attributes of the relation.
To observe this, you can calculate the “closure” of the determinant with respect to the set of functional dependencies: if it contains all the attributes, than it is a superkey.
So, for instance, in your example we have that the closure of A is A itself plus B:
A+ = AB
This means that A is not a superkey, and the relation is not in BCNF. In fact, the only key of your relation is A C D G .