Is Firestore/Realtime Database right for my use case?

91 views
Skip to first unread message

Miha Rejec

unread,
Apr 21, 2021, 11:07:25 AM4/21/21
to Firebase Google Group
I have an Android app, where user can add different cities that he visited on his visited cities list. Those cities are saved locally on his phone in relational SQLite database. Each user has his own list of cities, which are not pre-available (I don't have cities saved in the database) and selects them from cities that he gets from an API (there are 500GB of cities, that's why I don't keep them in the database). So each user has his own local database with his own cities (however, if two users visited "Paris", they will both have "Paris" in their database).

My problem is that I want to do some kind of back-up, so that user's data doesn't get lost if his phone breaks. I might also develop a web-app and iOS app in the future, so I might also need the data to be synced (if user adds a city on his phone, he should see it on the web).

That's why I am thinking of implementing Realtime Database or Firestore. I wanted to ask if these two solutions are the right ones for my use case? 

I will appreciate every suggestion.

Kind regards,
Miha

Adam Jack

unread,
Apr 22, 2021, 4:55:20 AM4/22/21
to fireba...@googlegroups.com
Miha,

I am just an average developer who has used Firebase, no more of an expert, however ... that sounds like a very reasonable use case of Firebase Firestore to me. I have an Android app where I take offline notes and they synch up to the cloud when online.

Firestore being closer to a document database than a relational (like SQLlite) might have two (or more) entries for "Paris" as a value (e.g. city="Paris") but you can have a collection of Cities that you could key into for more information on the City (e.g is in Country=France.) That said I'd take some time to read about Firestore and watch some of the helpful YouTube getting started videos so you can architect what you need.

I think Firestore is the preferred choice over Realtime Database these days.

regards

Adam

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/95bb04ef-909e-4335-a32e-2a153f7ad371n%40googlegroups.com.


--
Responserack
- incidents happen, response is crafted...

Miha Rejec

unread,
Apr 22, 2021, 5:36:42 AM4/22/21
to Firebase Google Group
Thank you Adam, for your nice and informative response!
I will look into Firestore and try to figure out the best architecture for my app.

Kind regards,
Miha
Reply all
Reply to author
Forward
0 new messages