title: How to make 1:N relationship by reference type using Angular 10 and Cloud Firestore
body: <p>We are looking for a mechanism that allows users to purchase digital content using Angular 10.</p>
  <p>I'm thinking about how to create 1:N relationship with reference type using Angular 10 and Cloud Firestore by referring to the following in digitalcontents.service.ts, but by nesting in subcollection or by reference
  I didn't know how to add or get to the users collection by referencing the root collection (digitalContents).</p>
  <p><strong>DB Structure</strong></p>
  <pre><code>-root-
  
  users&lt;collection&gt;
   uid&lt;document&gt;
    name:string&lt;field&gt;
    digitalContents:map[{
     digitalId:reference
     purchaceDate:timeStamp
    }]
  
  digitalContents&lt;collection&gt;
    digitalId&lt;document&gt;
      name:string&lt;field&gt;
      price:number
  </code></pre>
  <p><strong>Is the DB design good for how to add or get to the above users collection, or how should I do this?</strong>
  I would appreciate it if you could teach me. You can DI the AngularFireStore and get the collection.</p>
  <p>We apologize for the inconvenience, but we would appreciate it if you could teach us.</p>