Is there a way to update a SQLITE database using delta?

I would like to know if SQLite offers an update mechanism based on some delta file to be clear, for example, an Oracle database can be synchronized with SQL logs or snapshot logs.

Does SQLite offer an optimized mechanism for updating itself.

My use case is as follows: I have a local database that needs to be synchronized with some remote data, in an ideal world, I would like to build changes in an optimized format and only them, and not the entire database, there are some native SQLite mechanism or I should execute custom?

thanks

+7
source share
3 answers

We have this one and the same requirement, and we coped with this by writing insert / update / delete instructions that, when executed in the SQLLite database, update it.

We have a central SQLLite database, which is updated from some source. Updates should then be distributed to other SQLLite databases. We create SQL scripts and execute them against the databases that need to be updated.

Something like this will help you achieve what you are looking for.

+2
source

The topic is now covered in other SO questions: How can I compare two SQLite files?

In short, there is now a built-in tool for comparing two sqlite databases.

+1
source

You need a special solution. for SQLite there is nothing built into SQLite.

Please note that you can write a query that spans multiple databases. Using this, you can update one database from data to another completely in SQLite. You should still put the logic in yourself, though.

http://www.sqlite.org/lang_attach.html

0
source

All Articles