title: Is this a valid use of NULL foreign keys?
body: <p>Consider this very small contrived subset of my schema:</p>
  
  <pre><code>SensorType1
  ID : PK
  
  SensorType2
  ID : PK
  
  Reading
  Timestamp
  Value
  SensorType1_ID FK -&gt; SensorType1
  SensorType2_ID FK -&gt; SensorType2
  </code></pre>
  
  <p>Some readings are for SensorType1, some are for SensorType2.  I would probably add a constraint to ensure exclusively one of those FK's is always pointing somewhere.</p>
  
  <p>I've read a lot in the past about NULL FK's being very bad design, but I've been wrestling with my schema for days (see previous posts) and no matter which way I twist and turn it, I either end up with a NULL-able FK somewhere, or I have to duplicate my reading table (and it's dependants) for every sensor type I have (3).</p>
  
  <p>The above just seems to solve the problem nicely, but it leaves a not-so-nice taste in my mouth, for some reason.  It is the ONE place in my entire schema where I allow NULL fields.</p>
  
  <p>I thought a bit of peer review would help me accept it before I move on.</p>
  
  <p>Thanks!</p>