What type of database to use on iPhone app?
I want to create an iPhone app that will sync with 开发者_高级运维its online webb app client.
I currently have my data stored in a .plist. Will SQLite be the best way to go about this?
Also I will need to set up user accounts / registration database. Any sites or tutorials that deal with this stuff?
Thanks.
@Faisal:
Hi again.
Yeah you can use SQlite but I would suggesy you to go for the MySQL database on your database server and then you can parse data using JSON and fetch the data.
This will decrease an overhead of synchronization of database and also the iPhone app will be more light weight.
EDIT:
If you are new and have no background of database then it is better that you start with the Sqlite and then move on to the core data to store your data in iPhone or in that case MySQL to store your data on server.
EDIT-2:
This is a link which gives you many different options to learn SQlite and its implementation in iPhone app.
Where's the best SQLite 3 tutorial for iPhone-SDK?
Hope this helps you :)
You have two distinct problems; local storage and the client server data push.
For the local storage, the data model is simple (based on comments on PARTH's answer) and, thus, Core Data would be a perfect fit.
There is no need to learn SQLite first before using Core Data. Core Data is an object graph persistency and change management solution. SQLite happens to be one of Core Data's persistency mechanisms, but that is an implementation detail that is largely entirely hidden behind the higher level APIs.
For the client/server piece, using HTTP + JSON will work just fine for communicating from your app to the server.
On the server side, go with any of the myriad of different already written solutions for managing this kind of data. For this kind of application, PHP+MySQL is likely a perfectly acceptable solution in that registration + simple data storage is a problem that has been solved about a million times with that combination of tools (and, thus, you'll be able to find 100s of writeups of how to do exactly that).
精彩评论