title: Decomposing a relation into BCNF
body: <p>I'm having trouble establishing when a relation is in Boyce-Codd Normal Form and how to decompose it info BCNF if it is not. Given this example:</p>
  
  <p>R(A, C, B, D, E) with functional dependencies: A -> B, C -> D</p>
  
  <p>How do I go about decomposing it?</p>
  
  <p>The steps I've taken are: </p>
  
  <pre><code>A+ = AB  
  C+ = CD  
  R1 = A+ = **AB**  
  R2 = ACDE (since elements of C+ still exist, continue decomposing)  
  R3 = C+ = **CD**  
  </code></pre>
  
  <p>R4 = <strong>ACE</strong> (no FD closures reside in this relation)</p>
  
  <p>So now I know that ACE will compose the whole relation, but the answer for the decomposition is: AB, CD, ACE.</p>
  
  <p>I suppose I'm struggling with how to properly decompose a relation into BCNF form and how to tell when you're done. Would really appreciate anyone who can walk me through their thought process when solving these problems. Thanks!</p>