title: How to implement ondelete cascade in Firebase (Android)
body: <p>I am new with Firebase. I want to implement ondelete cascade in Firebase.
  Here is the problem for which I want solution
  I have two table "users" and "groups".</p>
  
  <pre><code>{  "users":{
  "user1":{
      "username":"john",
      "full_name":"John Vincent",
      "created_at":"9th Feb 2015",
      "groups":{
          "group1":true,
          "group3":true
      }
      "last_logins":...
  },
  "user2": ...,
  "user3": ...
  }"groups": {
   "group1"{
      "group_name":"Administrators",
      "group_description":"Users who can do anything!",
      "no_of_users":2,
      "members":{
          "user1":true,
          "user3":true
      }
    },
   "group2"{
      "group_name":"Moderators",
      "group_description":"Users who can only moderate!",
      "no_of_users":1,
      "members":{
          "user2":true
      }
    }
  }
  }
  </code></pre>
  
  <p>Please pardon me for above  code indentation.</p>
  
  <p>Now if I removed user1 from users table then how it should be automatically removed from groups table using Firebase.</p>
  
  <p>This can easily done using SQL but I don't know how to do this in Firebase. One way to do this in Firebase is to remove user1 from users and then makes group1 and group3 to null and then in groups table make user1 to null under group1/member but this need 2-3 calls. So is there any another best way to do this.
  Please help me I am stuck here.</p>