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 newData.e
newData.e
To allow adding new nodes, but prevent deleting or overwriting any node:
".write": "!data.exists()"
To allow adding and overwriting, but not deleting, any node:
".write": "newData.exists()"
Update: screenshot of the simulator for these rules