title: Patterns for building social network type applications?
body: <p>I need to design / architect / develop a web based social network type application.</p>
  
  <p>Basic functionality:<br>
   - users create accounts on the system<br>
   - users agree to "friend" each other<br>
   - users create content within system<br>
   - users specifies which friends may view/edit content that they created  </p>
  
  <p>Surely this core functionality has been created many times before?  Are there any best practice patterns out there for how to implement this sort of thing?</p>
  
  <p>I'm most interested in how the database for this would look.</p>
  
  <p>What would this look like from a SQL perspective (any database)?<br>
  What would this look like from a NOSQL perspective (any NOSQL database)?</p>
  
  <p>The thing I am most interested in, is how is the question of "content visibility" solved within the database?   i.e. how does the database/application ensure that only approved friends may see the user created content?</p>
  
  <p>Thanks</p>