title: Association between two entries in SQL table
body: <p>Imagine you have a database table that stores a list of people. You want to establish a relationship between peoples, i.e., person I is friend with person J.</p>
  
  <p>I suppose in this case, one needs a second table to store people associations. This table would contain two fields (person1, person2) and each entry corresponds to a one-to-one relationship between two people.</p>
  
  <p>Is that right or is there a more clever way to do it? This method makes the association table scale like n_users^2.</p>