title: Database Design: ordered many-to-many relationship
body: <p>In Django, I have the following models:</p>
  
  <pre><code>class Pink(models.Model):
      ...
  
  class White(models.Model):
      ...
      pinks = models.ManyToManyField(Pink)
      ...
  </code></pre>
  
  <p><br /><br />
  At some point, I needed to define an ordering of <code>Pinks</code> inside a <code>White</code>
  <em>(in order to have <code>White1.pinks: P1, P2, P3</code> instead of a random <code>White1.pinks: P2, P3, P1</code>)</em>,
  so I've created </p>
  
  <pre><code>class PinkInWhite(models.Model):
      pink = models.ForeignKey(Pink)
      white = models.ForeignKey(White)
      position = models.PositiveIntegerField("pink's position inside this white")
  
      class Meta:
          ordering = ['white','position']
  </code></pre>
  
  <p><br><br>
  <strong>Question 1:</strong> is this the better solution?</p>
  
  <p><strong>Question 2:</strong> This is obviously redundant: I still have a <code>pinks</code> field in my <code>White</code> model, because I need it in other situations which didn't require an ordering. Can I keep it, or is it better to remove it, and always use the <code>PinkInWhite</code> relation model instead?</p>
  
  <p><br /><br /><br />
  <sup>(Model names are fictional. For simplify the question I didn't use model's real names, and talking about Mr. X and Mr. Y wouldn't help readability...)</sup></p>