Petras
Petras

Reputation: 4759

Which database should you use to program an iPhone/iPad application?

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

Answers (4)

karim
karim

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

yogi
yogi

Reputation: 36

You can also use NSUserDefaults if u have less data to be stored in your database.

http://icodeblog.com/2008/10/03/iphone-programming-tutorial-savingretrieving-data-using-nsuserdefaults/

If the data to be stored is more then go for sqlite

Upvotes: -1

user333306
user333306

Reputation:

SQLite is the master choice here!

As an alternative, I would suggest you the simplicity of an XML file.

Upvotes: -1

V1ru8
V1ru8

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.

Core Data Programming Guide

Core Data Overview

Upvotes: 4

Related Questions