title: How to write a rule to prevent any deletion of node from database
body: <p>I am trying to write rules to secure database. But I am confused on writing a rule which will prevent from deleting any node from database. I have read regarding <code>newData.exists</code>but when I tried running it in simulator deletion was succeeded! As a node can be deleted by setting its value to null, so I tried simulating the value of node to null and it was successful, which was not desired.   </p>
  
  <p>Suppose I have this node:</p>
  
  <pre><code>root{
  Number of Users:20
  }
  </code></pre>
  
  <p>And I wrote these rules:</p>
  
  <pre><code>"Number of Users":{
  ".read":true,
   ".write":"auth!==null &amp;&amp; newData.exists()"
   }
  </code></pre>
  
  <p>Am I making any mistake, please correct me.</p>