Justin
Justin

Reputation: 2142

How to get data from an SQL database in Objective-C?

I know this has probably been answered before, but I cannot find much information on this subject. The only information I have found is that I need to use an SQL database, thus leading me to ask this question.

I am making an iPhone app that needs to store four integers, six floats, and two NSStrings online somehow (SQL sounds like the answer), and I need to be able to get the data as well. Is there any documentation on the subject that might help? If not, how can I get the data?

The next thing I need to know is how I can set it up for hundreds of users to store and access all of the variables. By this I mean that each user's four integers, six floats, and two NSStrings will be totally different, and I cannot figure out how to set it up in a way that works. Is there any documentation for this?

Thanks in advance!

Upvotes: 1

Views: 1827

Answers (1)

RThomas
RThomas

Reputation: 10882

One way

OData provides an SDK that allows you to consume/produce an OData service from a SQL database (or really any other data source) with objective-C on devices such as an iPhone.

The SDK can be found here: http://www.odata.org/developers/odata-sdk

There is also a developed client on codeplex: http://odataobjc.codeplex.com/

Keep in mind you'll have to develop both the provider (data source) as well as consumer (your app).

You can get a primer on the basics of building a provider here (using VS as an example, but its roughly the same no matter your platform).

http://msdn.microsoft.com/en-us/data/gg601462

A side benefit of OData is that once you have a producer... then any device can feasibly use it. Android, Windows Phone, PHP, Javascript, the list goes on. (I don't know if you care, but you might)

Upvotes: 3

Related Questions