title: How to avoid overwriting of data in firebase
body: <p>This is my code for adding records in Firebase. there's variable outside called restauCount valued (int) as 1 </p>
  
  <pre><code>public void sendMessage(){
  
      int restauCount = 1;
      String identifier ="Restaurant" + restauCount;
      Firebase userRef = firebaseRef.child("Caloocan");
      EditText nameInput = (EditText) findViewById(R.id.nameTxt);
      String name = nameInput.getText().toString();
  
      EditText locInput = (EditText) findViewById(R.id.locationTxt);
      String location = locInput.getText().toString();
  
      EditText typeInput = (EditText) findViewById(R.id.typeTxt);
      String foodtype = typeInput.getText().toString();
      if (!name.equals("")){
          Map&lt;String, String&gt; caloocan = new HashMap&lt;String, String&gt;();
          caloocan.put("resname", name);
          caloocan.put("resloc", location);
          caloocan.put("foodtype", foodtype);
  
          Map&lt;String, Map&lt;String, String&gt;&gt; users = new HashMap&lt;String, Map&lt;String, String&gt;&gt;();
          users.put(identifier,caloocan);
  
          userRef.setValue(users);
          restauCount++;
      }
  }
  </code></pre>
  
  <p>When i run the sendessage() again. i will type in the fields and when i click ADD which is the sendMessage it will be added in FireBase , however when i add new data. IT OVERWRITES THE OLD DATA INPUTTED ? HOW CAN I ADD MULTIPLE DATA IN FIREBASE WITHOUT OVERWRITING THE DATA? 
  restauCount was created to increment the number of Restaurant i inputted,</p>