2

Possible Duplicate:
Use CoreData or SQLite on iPhone?

I would like to build an App which enables you too find stores (for example stores with your favourite shoe brand) even when you're not connected with WiFi or 3G. For now the App should have a couple of possibilities:

  • User selects his favourite brand and gets a list of nearby stores. After that the user must be able to select a store to get the address, contact information and maybe a map;

  • User selects a certain city, gets a list of the available brands, selects one and gets a list of stores in that city selling the selected brand.

Since I'm new to making this kind of Apps, I have started doing my homework. I know I have to use a database to store all the data and found out there are a lot of ways to do so. One of them, creating a MySQL Database, wouldn't be an option since it can't be used offline. If I'm right two other methods are SQLite or CoreData. Problem is, I'm getting kinda lost in all the available information which makes it hard for me to start. Are both methods possible for this App and which one is the easiest for this job? I was hoping someone could point me in the right direction and maybe give me an usefull link or tutorial to continue with my App.

Thanks in advance! :)

Community
  • 1
  • 1
Matthijs
  • 21
  • 1
  • This may have some useful information. http://stackoverflow.com/questions/4871497/ios-core-data-sql-lite-integration-its-implications-on-data-portability/4871818#4871818 – xyzzycoder Aug 15 '12 at 22:45
  • erm, how do you get data about a store if you have no internet connection? Are bundling a static copy of a "retail store" database with the app? – Zhang Aug 16 '12 at 08:22

2 Answers2

2

Only use SQLite if you already know it, or you know that your use case is one of the rare few that has proven difficult for Core Data.

Thus, I would think your decision is simple. Use Core Data. It's extremely simple, unless you start updating data from multiple threads/contexts at the same time, then it gets pretty hairy relatively quickly.

There are tons of tutorials available online for Core Data, and ou always have Apple's documentation and sample code on their developer web site.

Jody Hagins
  • 27,943
  • 6
  • 58
  • 87
2

If you've never used MySQL or SQLite, just use CoreData. But if you have used MySQL or SQLite, i would recommend using SQLite as it will be easy for you to understand and thus you will be able to develop your app faster.

Derick F
  • 2,749
  • 3
  • 20
  • 30