如何同步在Android手机的SQLite数据库服务器上的MySQL数据库? [英] How to sync SQLite database on Android phone with MySQL database on server?

查看:1522
本文介绍了如何同步在Android手机的SQLite数据库服务器上的MySQL数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个Android应用程序。我想更新与服务器的MySQL数据库的本地SQLite数据库。我无法弄清楚,什么是最合适的,标准化的方式来做到这一点?

I am developing an android application. I want to update the local SQLite database with MySQL database on server. I am not able to figure out that what is the most appropriate and standardized way to do so?

推荐答案

创建一个Web服务(REST可能是最好的)和序列化的SQLite / MySQL的数据和PUT / POST /它到/从您的网络服务。这会给你的情况下,你决定从MySQL切换到别的服务器端抽象的一个很好的一层。

Create a webservice (REST is probably best) and serialize your SQLite/MySQL data and PUT/POST/GET it to/from your web service. This will give you a nice layer of abstraction in case you decide to switch from MySQL to something else server side.

这篇关于如何同步在Android手机的SQLite数据库服务器上的MySQL数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆