title: Firebase database rule to only allow one record
body: <p>Is there a Firebase rule so that I can make sure that only one record may exist in a certain table, for example.</p>
  <p><a href="https://i.stack.imgur.com/h7V0j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h7V0j.png" alt="enter image description here" /></a></p>
  <p>When ongoing has a record. It's not possible to add a new one.</p>
  <h3>count() and length() don't exist for firebase so it seems.</h3>