title: django-signals vs triggers?
body: <p>I read about django signals (<a href="http://docs.djangoproject.com/en/dev/topics/signals/" rel="noreferrer">http://docs.djangoproject.com/en/dev/topics/signals/</a>), but as far as I understand, signals are never converted into literal SQL triggers (<a href="http://en.wikipedia.org/wiki/Database_trigger" rel="noreferrer">http://en.wikipedia.org/wiki/Database_trigger</a>).</p>
  
  <p>If I'm correct that signals and triggers are different, then which one is better and in what ways? What's the best practice?</p>
  
  <p>....................</p>
  
  <p>Here's a concrete example if you want one:</p>
  
  <pre><code>class Location(models.Model):
      name = models.CharField(max_length=30)
  
  class Person(models.Model):
      location = models.ForeignKey('Location')
  
  class Team(models.Model):
      locations = models.ManyToManyField('Location')
  </code></pre>
  
  <p>I want a person to be able to join a team if and only if that person's location is within that team's set of locations. I do not know how to do that with normal relational constraints, so as far as I know I'm forced to use triggers or signals. My gut says that I should use triggers but I want to know best practice.</p>