Connecting Android app to amazon RDS

核能气质少年 提交于 2019-12-09 11:52:16

问题


I have an Android application and I want to move my local database in the cloud. I decided for a SQL database and not for a NoSQL, because I want to execute complex queries. I created a database instance in RDS from Amazon and I populated the database.

Now I want to connect my mobile app to my cloud database. I sow samples for NoSQL database connection, but I wasn't able to find examples for RDS. I saw that it is recommended to create a web service and connect to that web service, but it seems much more complicated than using a NoSQL and this doesn't feel right.

Does Amazon offer some API/service for Android - RDS connection? Do you know any sample code that handles this aspect?


回答1:


Does Amazon offer some API/service for Android - RDS connection?

No. AWS does not currently have an API for interacting with an RDS instance.

Do you know any sample code that handles this aspect?

You may want to access your database with PHP and get a JSON response. If your RDS instance is using MySQL then you’re in luck. There is already a lot of documentation on connecting Android to MySQL using PHP. You can get great sample code and instructions on this blog post.
Here is a very popular reference for connecting Android and MySQL.



来源:https://stackoverflow.com/questions/18188373/connecting-android-app-to-amazon-rds

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!