Kevan
Kevan

Reputation: 1195

SQLite Data Stored at Local and Want to Store and Sync at Cloud

Hello I have a to do list/task manager android application live on play store. It uses offline data storage with sqlite. Now I want to store that SQL database in cloud with syncing across multiple devices for every user.

I know the current treding solution for my usecase is to make similar kind of database(for e.g. MySql) at online and use rest api to access it. but this requires time and cost which are my major contraint as of now. in future after some revenue I am willing to go for it.

Sqlite is best suiting for my use cases but due to economic contraint can I use firebase realtime database(or firestore) with mapping between sqlite database stored at local and nosql database stored at cloud for some time.

is there any converting library which I can use to convert sqlite data to nosql data and vice-versa or I have to write my own code?

does the approach I am thinking is appropriate or I can have any thired solution? suggestions please.

(NOTE: also I am planing to support other platform like ios, windows etc after this)

Upvotes: 3

Views: 1980

Answers (2)

Alex Mamo
Alex Mamo

Reputation: 138824

If you're looking for a magic button that can convert your database from your SQLite database to Firebase Realtime database or Cloud Firestore, or vice-versa, you need to know that there isn't one! There is also no API for doing that. And as far as I read, Firebase creators won't create one. So unfortunately, you'll need to convert the database yourself.

For a better understanding I recommend you see this video, The Firebase Database For SQL Developers.

Upvotes: 0

Jason Berryman
Jason Berryman

Reputation: 4898

Syncing data between a relational database and a NoSQL is not a straightforward task and I wouldn't recommend it. Your best option may be to switch from SQLite to Cloud Firestore.

There's a fantastic new video from the Firebase team which will help enormously with this task. What is a NoSQL Database? - Get to Know Cloud Firestore Ep.1

Upvotes: 1

Related Questions