title: Self join many-to-many relationship
body: <p>From sample data below, assuming Julie (1) has friends Adam, David, John (2, 3, 4).
  Adam (2) has friends Julie, David, John (1, 3, 4).</p>
  
  <pre><code>ID  Name
  1   Julie
  2   Adam
  3   David
  4   John
  5   Sam
  </code></pre>
  
  <p>This make a self join and many-to-many relationship within ONE table.</p>
  
  <p>In addition to the above problem, say Julie (1) added Sam (5) as friends, technically and practically speaking, Sam (5) is now friend of Julie (1) as well. This make things more complicated because the relationship bi-directional.</p>
  
  <p>So I'm wondering:</p>
  
  <ol>
  <li>How do I design the database?</li>
  <li>How do I make a query that will return all friends of every users?</li>
  </ol>
  
  <p>Thank you!</p>