Jamie McAllister
Jamie McAllister

Reputation: 729

connect to remote Database in IOS

i'm trying to develop an app that needs access to a remote database stored on my web server, i have looked online and all the tutorials i can find are about sqlite3 and only show using local databases, any answered questions are vague and dont really answer the question.

there was mention of PHP/XML on one answer, nothing more specific than "use PHP or XML" - both of which i have never used

could someone point me to a tutorial, or explain what i will need to do to connect to my database?

Upvotes: 1

Views: 1700

Answers (2)

sqlrest1
sqlrest1

Reputation: 1

In order to connect your iOS app to a remote database, you need a REST server. There are various ways you can create that including Jackson and Jersey frameworks but those take too long and need lot of expertise. There is a new service called EspressoLogic that claims to provides a fast RESTful service that connects to various remote databases.One of my friends has tried it and liked it.

Upvotes: 0

Joni
Joni

Reputation: 111219

Connecting from an iOS device directly to a remote database system is generally not a good idea for several reasons:

  • The database has to be open to all of the Internet, which is a bad idea for security reasons. You probably have heard of SQL injection; this is worse. Everyone can connect directly to the database and send any SQL commands they want.
  • The database protocol is not designed for high-latency links; it may be ver "chatty" which makes it unusably slow over a WAN.
  • (Trying to think of a third...)

That said, technically it can be done. You can probably call the MySQL C client library directly from Objective C.

Upvotes: 1

Related Questions