title: Structuring Data in Firestore in belongs-to and has-many relationship
body: <p>Coming from a SQL/Rails background I have a project I want to use Firebase/Firestore (with React) for and asking for help in setting up the data and collection structure.</p>
  
  <p>"Models":</p>
  
  <ul>
  <li>Users</li>
  <li>Items</li>
  <li>Categories</li>
  <li>Locations</li>
  </ul>
  
  <p>A user can have many items and an item belongs to a user.
  A category can have many items and an item belongs to a category.</p>
  
  <p>I need to be able to show all Categories, Locations and Items on the home page.
  First I need to list all Items, and they're filterable by either Category and/or Location.</p>
  
  <p>How do I best set that data up in Firestore?</p>
  
  <p><em>Sorry for the rails styled explanation, but SQL is all around my head.</em></p>