0

I want to make an database with UUID for every click on a button so when input data the old data didn't got distract but they will add more data to the Firebase

Somehow like sequential like keep +1 +1 from the old or exist UUID in Firebase

Maybe the other name was autoincrement, but for the database.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
billy
  • 7
  • 1
  • 8
  • 3
    A [*UUID*](https://en.wikipedia.org/wiki/Universally_unique_identifier) is not meant to be sequential. – Basil Bourque Aug 11 '21 at 18:54
  • Firebase has two databases: Realtime Database, and Firestore. Which one are you asking about? Note that this has been asked before for both of these, but knowing which one you are using will allow us to find the best match for your question too. – Frank van Puffelen Aug 11 '21 at 18:58
  • @FrankvanPuffelen im using the realtime databse – billy Aug 12 '21 at 09:04
  • Check this [answer](https://stackoverflow.com/questions/54064365/how-to-give-specific-number-to-the-key) out. – Alex Mamo Aug 12 '21 at 10:16
  • Thanks for clarifying. Firebase's Realtime Database doesn't generate auto-increment keys, because they don't work well in many cases - as explained in this blog post: [Best Practices: Arrays in Firebase](https://firebase.googleblog.com/2014/04/best-practices-arrays-in-firebase.html). The topic has been covered before, so I'd recommend checking out some top results from this [search](https://www.google.com/search?q=firebase+realtime+database+auto-increment+keys). I've also linked a few questions with great answers to the top of your post. – Frank van Puffelen Aug 12 '21 at 14:22

0 Answers0