title: Foreign Key based on the sum of a related table
body: <p>I'm wondering if this is at all possible.</p>
  
  <p>I was looking through normal forms on wikipedia and came across the <a href="http://en.wikipedia.org/wiki/Domain/key_normal_form" rel="nofollow">Domain/key normal form</a>. I have a similar set up to the second set of tables in the referenced link. However, what if I wanted to not have a "Net Worth in Dollars" column, but instead had another table that listed all of their sales. Is there a way to set the Wealthiness Status via foreign key based on the sum of their sales?</p>