title: How to add more than one child under same parent in Firebase Realtime Database without using push()
body: <p>I am new to <code>Firebase Realtime Database</code>, I want to generate the <strong>unique key</strong> under parent node without using <strong>push()</strong>.As push() generate the random unique key of 128 bit.</p>
  
  <p>I want my current date to be the unique key under parent node. If date did not match with the last child of parent node then it must generate a new node in the parent. </p>
  
  <p>Below mentioned is my code:</p>
  
  <pre><code>     Firebase reference = new Firebase("https://maps-abcdxyz.firebaseio.com/user");
                      if (s.equals("null"))
                      {
                          String key = reference.child("User").push().getKey();
  
                          String inStatus = "1";
  
                          UserData user = new UserData(attendIN,"0","0","0");
                          Map&lt;String, Object&gt; postValues = user.inoutTime();
                          Map&lt;String, Object&gt; childUpdates = new HashMap&lt;&gt;();
                          childUpdates.put( "/" + username + "/" + month_name + "/" + todayDate ,postValues);
  
                          reference.updateChildren(childUpdates);
  
                          Toast.makeText(getApplicationContext(),"In Time Submitted",Toast.LENGTH_SHORT).show();
                      }
                      else
                      {
                          if(jInStatus.equals("1"))
                          {
                              Toast.makeText(getApplicationContext(),"In time already Submitted",Toast.LENGTH_SHORT).show();
                          }
                          else
                          {
                              Firebase referenceDate = new Firebase("https://maps-abcdxyz.firebaseio.com/user/" + username +
                                      "/" + month_name);
  
                              String inStatus = "1";
                              FirebaseDatabase.getInstance().setPersistenceEnabled(true);
                              FirebaseDatabase mDatabase = FirebaseDatabase.getInstance();
                              DatabaseReference myRef = mDatabase.getReference("/" + "user" + "/" + username + "/"+ month_name + "/");
                              UserData user = new UserData(attendIN,inStatus,"0","0");
                              Map&lt;String, Object&gt; postValues = user.inoutTime();
                              Map&lt;String, Object&gt; childUpdates = new HashMap&lt;&gt;();
                              myRef.child(todayDate).setValue(postValues);
  
  Toast.makeText(getApplicationContext(),"In Time Submitted",Toast.LENGTH_SHORT).show();
                          }
  
                      }
  </code></pre>