title: schema migration: one-to-many, many-to-many in PostgreSQL
body: <p><strong>Background</strong></p>
  
  <p>In MySQL, I need to model one-to-many with <em>two tables</em> and many-to-many with <em>three tables</em>, if I want to keep <em>normalized tables</em>.</p>
  
  <p>I am investigating a migration to <strong>PostgreSQL</strong> which, amazingly, allows for <em>vector</em> and even <em>multidimensional vector</em> fields!</p>
  
  <p><strong>Questions</strong></p>
  
  <p>What are the cannonical mappings for <em>one-to-many</em> and <em>many-to-many</em> in <strong>PostgreSQL</strong>?</p>
  
  <ul>
  <li><p>Is <em>one-to-many</em> simply <em>one table</em> with a <em>vector</em> field?</p></li>
  <li><p>Is there a cannonical way to model <em>many-to-many</em> or does it depend on the situation (like how I need to query)?</p></li>
  <li><p>Are there any <em>caveats</em> for using the <em>array field</em>?</p></li>
  </ul>