Synchronize a local SQLite database with SQLite SQL Server

Is this possible, and if so, how can I effectively synchronize the local database with the global one, so when the action is performed in the local version, it is also done in the global database. Simple use of version control to undermine the global is unacceptable, as there may be several local copies of the database in accordance with the number of people making changes to the database. In other words, you can simply have a database mirror so that it can be retrieved locally, even if it is somewhere on the network.

+3
source share
1 answer

Database synchronization if this is a very complex issue. The easiest approach is to save the record at the application level (or, despite the fact that the sqlite user shell) of all queries is executed against each system, and then run them again during synchronization.

This becomes problematic if you have multiple sources or two-way synchronization. Queries that run perfectly in the same database may fail on each other due to the different order of operations (assuming referential integrity is enabled).

, . , , . , , , , , .

+4

Source: https://habr.com/ru/post/1755547/


All Articles