Reputation: 4759
I am new to iPhone development and want to know which database you use to program an iPhone/iPad?
I have heard its SQLite, are there any alternatives to this?
The application I am programming is like an online shop however you can't buy products, only view their details.
Upvotes: 1
Views: 2757
Reputation: 15589
If you have any plan to use the database file outside iPhone e.g. in other computer, or data input program to populate data, then SQlite is the best choice. CoreData modify the fields name when you create the database inside XCode. But if the data is only accessed by your app in the iPhone, best choice is CoreData. If you want to run complex sql query then sqlite is better. Read about NSPredicate, what type of query you can do there.
Upvotes: 1
Reputation: 36
You can also use NSUserDefaults if u have less data to be stored in your database.
If the data to be stored is more then go for sqlite
Upvotes: -1
Reputation:
SQLite
is the master choice here!
As an alternative, I would suggest you the simplicity of an XML
file.
Upvotes: -1
Reputation: 6147
You should use CoreData for that. CoreData is a database abstraction layer which uses SQLite to store your data. Or you could use SQLite directly. But I would prefer CoreData.
Upvotes: 4