title: CouchDB data design & security
body: <p>Here is a scenario that I'm trying to reason with using CouchDB. Let say there are Sellers that can post items for sale, and Buyers that can place offers on those items. how could this work in CouchDB so that the following are true...</p>
  
  <ul>
  <li>Sellers can query to see their posts and all offers made on it</li>
  <li>Buyers can query to see their offers and the post it was made on</li>
  <li>users cannot see offers made by other users unless said offer was on an item they posted </li>
  </ul>
  
  <p>the main problems i see is with the lack of any "Foreign key" equivalent, therefore i could imagine offers being an array on the post. but then i need to make sure that when queried, you only see the offers you're allowed.</p>
  
  <p>currently I'm just using CouchDB independently without, for example, an express server. </p>