title: How to read, write and query data in Firebase Realtime Database using Firebase SDK v9 (Modular)
body: <p>How do you perform read and write operations and query data from Firebase Realtime Database, where the traditional syntax in v8 goes like this:</p>
  <pre><code>const snapshot = await firebase.database().ref(&quot;/path&quot;).once(&quot;value&quot;)
  </code></pre>
  <p>Considering the sample data:</p>
  <pre><code>{
    &quot;users&quot; : {
      &quot;user1&quot; : {
        &quot;age&quot; : 34,
        &quot;name&quot; : &quot;user1&quot;
      },
      &quot;user2&quot; : {
        &quot;age&quot; : 23,
        &quot;name&quot; : &quot;user2&quot;
      },
      &quot;user345&quot; : {
        &quot;age&quot; : 19,
        &quot;name&quot; : &quot;user345&quot;
      },
      &quot;user4&quot; : {
        &quot;age&quot; : 15,
        &quot;name&quot; : &quot;user4&quot;
      },
      &quot;user56&quot; : {
        &quot;age&quot; : 45,
        &quot;name&quot; : &quot;user56&quot;
      },
      &quot;user9435&quot; : {
        &quot;age&quot; : 8,
        &quot;name&quot; : &quot;user9435&quot;
      }
    }
  }
  </code></pre>
  <p>Also how would you use the methods <code>equalTo(), orderByChild(), etc</code>?</p>