title: Social networking DB schema?
body: <p>User</p>
  
  <ul>
  <li>Groups
  <ul>
  <li>Link
  <ul>
  <li>User1</li>
  <li>User2</li>
  <li>Time (or some other relevant link data)</li>
  </ul></li>
  <li>Posts</li>
  </ul></li>
  </ul>
  
  <p>A user can only see a post if the user belongs to a link that belongs to the same group to which the post belongs.</p>
  
  <p>I would like to optimize the database for querying all posts that a given user is allowed to see. What is the best way to structure the database to do this?</p>
  
  <p>Thanks for the help!</p>
  
  <p>EDIT: The above schema is a basic idea to get you started. Thanks again!</p>