title: best way to store 1:1 user relationships in relational database
body: <p>What is the best way to store user relationships, e.g. friendships, that must be bidirectional (you're my friend, thus I'm your friend) in a rel. database, e.g. MYSql? </p>
  
  <p>I can think of two ways:</p>
  
  <ol>
  <li>Everytime a user friends another user, I'd add two rows to a database, row A consisting of the user id of the innitiating user followed by the UID of the accepting user in the next column. Row B would be the reverse.</li>
  <li>You'd only add one row, UID(initiating user) followed by UID(accepting user); and then just search through both columns when trying to figure out whether user 1 is a friend of user 2.</li>
  </ol>
  
  <p>Surely there is something better?</p>