连接Android应用程序到Amazon RDS [英] Connecting Android app to amazon RDS

查看:481
本文介绍了连接Android应用程序到Amazon RDS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android应用程序,我想将我的本地数据库在云中。我决定了SQL数据库,而不是一个NoSQL的,因为我想要执行复杂查询。我在RDS从亚马逊创建的数据库实例,我填充数据库。

现在我想我的移动应用程序连接到我的云数据库。我播种样品的NoSQL数据库连接,但我没能找到例子RDS。我看到它是建议创建一个Web服务并连接到Web服务,但它似乎比使用NoSQL的要复杂得多,这感觉不对。

难道亚马逊提供了一些API /服务机器人 - RDS连接?你知道有什么样code,处理这方面?

解决方案
  

难道亚马逊提供了一些API /服务机器人 - RDS连接

没有。 AWS目前没有一个API,用于与RDS实例进行交互。

  

你知道有什么样code,处理这方面?

您可能想用PHP访问数据库,并得到一个JSON响应。如果你的RDS实例使用MySQL,那么你很幸运。目前已经在使用PHP连接的Andr​​oid到MySQL大量的文档资料。你可以得到很大的样品code和的这篇博客
这里是连接Android的一个非常受欢迎的参考和MySQL的

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?

解决方案

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.

这篇关于连接Android应用程序到Amazon RDS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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