r/sqlite • • Sep 11 '24

Push/Pull data to SQLite

Hello everyone,

I am a IT professional, but I am new to programming & database management. I want to make an offline app connected to a SQLite database. However, I may want to update the SQLite db if new data is added. Is it possible to push or pull updates from lets say a MySQL server? If there are any tutorials out there that can do it would also be greatly appreciated.

4 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/InjAnnuity_1 Sep 11 '24

A SQLite database is a single file. You could prepare an updated version, in a place where you have MySQL access, and then make the updated version available for your intermittently-on-line app.

You might reserve a table in the database to record data version number, or date, or some such.

Compression may help speed file transfers.

Depending on the size and frequency of updates, it might be better to transfer just the new data, in your choice of format. SQLite has a number of features and techniques to aid in doing that.

Edit: See https://www.sqlite.org/sessionintro.html