I have an app that allows the user to add notes.
The notes should be stored in a firebase database.
My problem right now, is that I can't save more than one note, but it just updates the note that already exists in a database.
I think you might need to add a unique id to each note, but I don't know how to do it.
That's what I have right now.

```
public class AddNoteFragment extends Fragment implements View.OnClickListener {

    private EditText ETnoteTitle, ETnoteDesc, ETnoteLastDate;
    private Button saveNoteBTN, deleteNoteBTN;
    private Note note;

    private FirebaseAuth mAuth;
    private FirebaseDatabase db;
    private DatabaseReference users;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_add_note, container, false);

        mAuth = FirebaseAuth.getInstance();
        db = FirebaseDatabase.getInstance();

        ETnoteTitle = view.findViewById(R.id.noteTitle);
        ETnoteDesc = view.findViewById(R.id.noteDesc);
        ETnoteLastDate = view.findViewById(R.id.noteLastDate);
        saveNoteBTN = view.findViewById(R.id.saveNoteBTN);
        saveNoteBTN.setOnClickListener(this);
        deleteNoteBTN = view.findViewById(R.id.deleteNoteBTN);
        deleteNoteBTN.setOnClickListener(this);
        users = db.getReference("Users").child(mAuth.getCurrentUser().getUid()).child("Notes");

        return view;
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.saveNoteBTN:
                note = new Note(ETnoteTitle.getText().toString().trim(),
                        ETnoteDesc.getText().toString().trim(),
                        ETnoteLastDate.getText().toString().trim());
                users.setValue(note).addOnSuccessListener(new OnSuccessListener<Void>() {
                    @Override
                    public void onSuccess(Void aVoid) {
                        Log.d("NoteAdded", "true");
                    }
                }).addOnFailureListener(new OnFailureListener() {
                    @Override
                    public void onFailure(@NonNull Exception e) {
                        Log.d("NoteAdded", "false");
                    }
                });
                break;
            case R.id.deleteNoteBTN:
                break;
        }
    }
}

```

[![](https://i.stack.imgur.com/PDDS0.png)](https://i.stack.imgur.com/PDDS0.png)
When I add a new note, the data in a database is not added, but updated in the new
And I want a new note added.