Is there a way to update SQLITE database using deltas?

后端 未结 3 1385
执笔经年
执笔经年 2020-12-31 23:45

I would like to know if SQLite proposes a update mechanism based on some delta file, to be clear for example an Oracle database can be synchronized with sql redo logs or sna

相关标签:
3条回答
  • 2021-01-01 00:07

    We have this exact same requirement and we have met this by writing insert/update/delete statements which when executed against a SQLLite database updates it.

    We have a central SQLLite database which is updated from some source. The updates then are required to be propagated to other SQLLite databases. What we do is we generate SQL Scripts and execute them against the databases which needs to be updated.

    Something similar will help achieve what you are looking for

    0 讨论(0)
  • 2021-01-01 00:15

    You need a custom solution. there is nothing built-in to SQLite to do this automatically.

    Note that you can write a query that spans multiple databases. Using this you can update one database from data in another entirely within SQLite. You still need to put the logic in yourself though.

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

    0 讨论(0)
  • 2021-01-01 00:28

    The subject is now covered in another SO questions: How can I diff 2 SQLite files?

    In short, there's now a built-in tool to diff two sqlite databases.

    0 讨论(0)
提交回复
热议问题