2

So currently, I am making an app in which it allows the user to create expenses and store them. Each expense has properties such as date, name, amount, type of expense, category and etc. Currently, I am storing all of this on CoreData, which I find is easy and manageable, however I really want to move to database storage so that the app doesn't take up an increasing amount of storage in the user's phone.

I have several questions if someone can answer them.

Can firebase databases be used to store characteristics of an object like core data can sort of like a JSON String?

Can firebase save something and retrieve it if you are not connected to the internet?

Which firebase storage should I use. When I go on their website, they have multiple databases such as RealTime, Cloud Storage and etc. which one would be the best one for what I am trying to do.

Thanks for all the help!

Arnav GUPTA
  • 295
  • 1
  • 2
  • 17
  • Firebase has many storage layers for many different types of data. See my [answer to this question](https://stackoverflow.com/questions/37482907/firebase-differences-between-realtime-database-and-file-storage) for a summary of them. The latest database for storing document-type data is Cloud Firestore, which also has the best support for offline use-cases of all Firebase offerings. – Frank van Puffelen Jan 15 '18 at 05:18
  • Thanks so much. Just read your answer and it cleared everything up! – Arnav GUPTA Jan 15 '18 at 10:50
  • *"I really want to move to database storage so that the app doesn't take up an increasing amount of storage in the user's phone.*" That statement doesn't make sense. Core Data is a database. More data takes more space. What problem are you actually trying to solve? – Tom Harrington Jan 15 '18 at 19:10

1 Answers1

1
  1. Firebase store data as JSON, So you need to export your Core Data Model structure and values into a JSON format, to upload it on Firebase.

  2. Yes, Firebase allows offline save and retrieve data into DB. You need to enable offline Persistence for that.

  3. You have to use RealTime Database or Cloud Firestore to store data in Firebase database. Cloud Storage is used to store files like images, text files or other files.

Surjeet Singh
  • 11,691
  • 2
  • 37
  • 54
  • Hi @Surjeet I appreciate your concern, but can you suggest any tool or better way of achieving this, my coredata has around 30 entities and lots of relationship. – Mohit G. Feb 11 '22 at 08:34