Android的 - 指南 - 与在线数据库的应用程序 [英] Android - guidelines - app with online database
问题描述
我希望创建一个应用程序,基于存储在远程数据库中的数据。
I want to create an app that is based on the data stored on remote database.
我心目中是使用VPS我必须存储数据库。然后该应用会,点播,访问(和更新)的数据库上的数据。
What i have in mind is to use a VPS i have to store the database. Then the app will, on demand, access (and update) the data on the database.
如何设置我的VPS为了做到这一点?现在,我只是有一个MySQL服务器运行。
How should i set up my VPS in order to do that? Right now i just have a MYSQL server running.
修改:我想知道什么是我应该遵循以具有基于一个在线数据库,一个Android应用程序的最佳实践。
Edit: I want to know what are the best practices i should follow in order to have an android app based on an online database.
- 我可以直接从应用程序访问数据库?
- 请我需要什么 除了数据库服务器,以帮助该数据库的通信和 该应用程序?
- 我应该使用,因为某些原因,另一个数据库,而不是MySQL的 (更快,更安全,更轻松地连接)?
- Can i access the db directly from the app?
- Do i need anything besides the database server to assist the communication of the db and the app?
- Should i use, for some reason, another db instead of mysql (faster,more secure, easier to connect)?
我是新来这个,我想一些一般原则。
I am new to this and i would like some general guidelines.
感谢。
推荐答案
我直接从应用程序访问数据库?
据我所知,没有你仍然不能直接从Android的访问MySQL。它已经一年,因为我做Android开发,但你很可能需要的东西之间(坐在像一个RESTful服务,看到的 HTTP://ph$p$pstsql.sourceforge.net/ )
As far as I know, no you still cannot access MySQL directly from Android. It has been a year since I did Android development, but you will most likely need something sitting in between (like a RESTful service, see http://phprestsql.sourceforge.net/).
<一个href="http://stackoverflow.com/questions/11324939/how-to-access-online-mysql-database-in-android">how访问在线mysql数据库中的Android
<一个href="http://stackoverflow.com/questions/8784122/how-to-access-external-mysql-database-in-android">how访问外部mysql数据库中的android?
我是否需要除数据库服务器中的任何协助数据库和应用程序的通信?
是的。见上面的答案
我应该使用,因为某些原因,另一个数据库,而不是MySQL的(更快,更安全,更轻松地连接)?
这是由你。有一些NoSQL的解决方案,提供内置的RESTful接口(我认为CouchDB的做到这一点,MongoDB的,等...)。
That is up to you. There are some NoSQL solutions that offer a RESTful interface built in (I think CouchDB does this, MongoDB, etc...).
这篇关于Android的 - 指南 - 与在线数据库的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!