简体   繁体   English

如何将 SQLite 数据库与服务器同步?

[英]How to synchronize SQLite database with server?

I have created a SQLite database in my android app.我在我的 android 应用程序中创建了一个 SQLite 数据库。 I want the data of every user in a centralized database.我想要集中数据库中每个用户的数据。 How can i setup the server and the sychronization that will allow me to get the data from every user?我如何设置服务器和同步,以便我从每个用户那里获取数据? What are the steps that need to be followed ?需要遵循哪些步骤?

Data synchronization is very complicated process.数据同步是一个非常复杂的过程。 In document above there are some sample patterns which you may use.在上面的文档中有一些您可以使用的示例模式。

http://www.dre.vanderbilt.edu/~schmidt/PDF/PatternPaperv11.pdf http://www.dre.vanderbilt.edu/~schmidt/PDF/PatternPaperv11.pdf

You need to know what kind of troubles you can meet and include solutions for them in your project.你需要知道你会遇到什么样的麻烦,并在你的项目中包含它们的解决方案。

Eg例如

User1 and User2 have synchronized data. User1User2已同步数据。 User1 is modyfying one row in table Data . User1正在修改表Data一行。 In the same time User2 has deleted this row.同时User2删除了这一行。 Your job is to handle this case.你的工作就是处理这个案子。

I guess replication is what you are looking for.我想复制就是你正在寻找的。

Replication is a set of technologies for copying and distributing data and database objects from one database to another and then synchronizing between databases to maintain consistency.复制是一组技术,用于将数据和数据库对象从一个数据库复制和分发到另一个数据库,然后在数据库之间进行同步以保持一致性。 Using replication, you can distribute data to different locations and to remote or mobile users over local and wide area networks, dial-up connections, wireless connections, and the Internet.使用复制,您可以通过局域网和广域网、拨号连接、无线连接和 Internet 将数据分发到不同位置以及远程或移动用户。

http://msdn.microsoft.com/tr-tr/library/ms151198.aspx http://msdn.microsoft.com/tr-tr/library/ms151198.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM