title: Is these many-to-many relations for more than two tables are good?
body: <p>I'm a newbie in database design.</p>
  <p>Can anybody look at this design:</p>
  <p><a href="https://i.stack.imgur.com/cP4Kj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cP4Kj.jpg" alt="enter image description here" /></a></p>
  <ul>
  <li><p>Initially I created these tables - m2m relation first. It was simple:</p>
  <ul>
  <li><code>students</code></li>
  <li><code>contacts</code></li>
  <li><code>contact_types</code></li>
  </ul>
  </li>
  <li><p>But new table <code>teachers</code> was added into database after that.</p>
  </li>
  <li><p>...and each <code>teacher</code> may have <code>contact</code> too.</p>
  </li>
  <li><p>I just added new column into <code>contacts</code> &quot;junction&quot; table.</p>
  <ul>
  <li>But I don't like this design, because there are empty values in columns of <code>teacher_id</code> and <code>student_id</code> columns.</li>
  </ul>
  </li>
  <li><p>Is there better way to create many-to-many relations for that situation?</p>
  </li>
  <li><p><strong>Main goal is to get ability of adding multiple contacts for one <code>student</code>/<code>teacher</code></strong>.</p>
  </li>
  </ul>
  <hr />
  <p>The former variant of my design, but I don't know if it is optimal or not.</p>
  <p><a href="https://i.stack.imgur.com/Cz4g4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Cz4g4.png" alt="old schema" /></a></p>