如何在iOS的连接亚马逊RDS [英] How to connect amazon RDS in iOS
问题描述
我在做一个应用程序中,我使用亚马逊简单数据库,但现在我已经改变了简单的数据库到Amazon RDS的MySQL。简单的数据库有自己的API和框架的工作访问数据库和表中的iOS,但如何访问Amazon RDS的MySQL在iOS的任何想法如何完成这件事。他们有亚马逊有简单的DB库,如果有任何其他方式libaray使用的iOS应用程序的感谢亚马逊RDS
I am making an app in which i was using Amazon Simple db but now i have changed the simple db to amazon rds mysql. Simple db had own api and frame works to access the data base and tables in iOS but how to access amazon rds mysql in iOS any idea how to get this done. They have Amazon have libraries for simple db if there is any other way libaray to use amazon rds in iOS app thanks
推荐答案
亚马逊RDS实例都是常规的MySQL /甲骨文/ ...数据库。您可以连接到它从任何设备或平台,只要你有它的驱动程序。
Amazon RDS instances are regular MySQL / Oracle / ... databases. You can connect to it from any device or platform, provided you have a driver for it.
有一个C驱动器为MySQL(见这个问题<一href="http://stackoverflow.com/questions/4615442/how-to-install-mysql-connector-c-on-mac-os-x/5059005#5059005">How在Mac OS X上安装MySQL Connector / C ?)在Mac OS X和iOS。
There is a C driver for Mysql (see this question How to install MySQL Connector/C on Mac OS X?) that works on Mac OS X and iOS.
如果您想从iOS应用程序访问RDS MySQL,你必须包含这个驱动程序的二进制分发和使用的驱动程序曝光功能,从您的code。
If you want to access RDS MySQL from an iOS application, you must include this driver in your binary distribution and use the functions exposed by the driver from your code.
在对建筑的角度来看,我却质疑这种做法。有很多好处通过API层(Web应用程序在iOS应用程序和数据库之间坐着)来访问你的数据库。
On an architectural point of view, I however question this approach. There are many benefits to access your database through an API layer (a web application sitting in between your iOS App and the database).
好处是: - 脱钩:没有数据结构暴露给客户端应用程序 - 可扩展性:该API可以通过读取复制或拆分时,负载平衡翻过DB - 安全:一个API,让你执行身份验证和授权
Benefits are : - decoupling : do not expose data structure to client app - scalability : the API can load balance accross DB when using read replica or sharding - security : an API let you enforce authentication and authorisation
这篇关于如何在iOS的连接亚马逊RDS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!