title: Foreign Key Cross-Reference Between Tables
body: <p>I'm a beginner to database design.  So I have two tables for implementing multiple choice, one called <code>MC</code>, for holding the questions, and <code>MC_choice</code>, for holding the choices for each question.  So <code>MC_choice</code> has a foreign key constrained to reference to <code>MC</code>.  So far, so good.</p>
  
  <p>In my 1st iteration, I stored the correct choice in the <code>MC_choice</code> table with a Boolean column.  And then I thought, hmm, there's some redundancy and potential update anomalies, and since which choice is correct is functionally dependent on the question itself, I'm going to store the correct choice in the <code>MC</code> table itself.</p>
  
  <p>So I added a field in the <code>MC</code> table that is a foreign key constrained to pointing to <code>MC_choice</code>.  But now it becomes very difficult to insert new choices or questions because the two are now like recursively constrained.  I am using Rails and being a beginner in that as well I feel like this schema design is making my life quite unnecessarily difficult.</p>
  
  <p>1) If I want to insist on this recursive foreign key reference, how do I save to the database?<br>
  2) Does this design make sense?  I feel like the functional dependency argues for it, but seems so cumbersome in practice.<br>
  3) Does ActiveRecord in Rails support this kind of operation?<br>
  4) If the above schema is just silly, how should I be designing my tables?</p>