title: How to design mysql db where one table should be related to only one of two others?
body: <p>Let's assume I have books and reviews and I also have comments which can be related to books or reviews, but not to both of them at the same time, how should I design my DB then? I figured I can do it this way, but then comments can be related to both books and reviews...:</p>
  
  <pre><code>class Book(models.Model):
      title = models.CharField(max_length=100)
  
  class Review(models.Model):
      review = models.TextField()
  
  class Comment(models.Model):
      book = models.ForeignKey(null=True)
      review = models.ForeignKey(null=True)
  </code></pre>