title: Designing Cloud Firestore schema with many-to-many and cross entity relationships
body: <p>Just a quick question about designing a Firestore schema:</p>
  
  <p>I know you gotta use the right tool for the job, and Firestore isn't supposed to be a Relational database, but is there suggested techniques to model many to many relationships?</p>
  
  <p>Ex:</p>
  
  <p>I want to build a property management app where </p>
  
  <p>Companies own Properties, which contain Units. Hierarchy is straightforward here.</p>
  
  <p>So Tenants will rent multiple Units over time, and each Unit will have many tenants over time.. all that encapsulated by Leases which tie 1 Unit to 1 or more Tenants.</p>
  
  <p>Units can own Leases I guess, but how do Tenants see all their Leases over time.. should Leases have a sub collection that references the Tenants.. are Tenants top level?</p>
  
  <p>Just looking for some basic suggestions.. </p>
  
  <p>Or is it better to just user GraphQL with a relational database?</p>