0

I know the difference between Using Coredata and Direct Sql Commands to be used for iOS while making Local Storage. But still can any one suggest which one is better, efficient and Optimized and can work with Big data ?? How calls work with both of them ? Also Coredata has context to interact with so is there any increasing rate of making calls? Thanks a lot for your help.

Vish
  • 341
  • 1
  • 4
  • 19

3 Answers3

8

Core Data. Apple has invested a lot of energy into making it work well on iOS. Considering you are working in a limited CPU and limited memory environment you really want to use a framework that takes those into consideration.

If you use SQLite directly you need to handle all of that on your own. ARC won't help you because it is a C library.

Core Data is targeted to keep your memory in check. You can still break it of course but you will go much further using Apple's libraries instead of avoiding them.

Marcus S. Zarra
  • 46,571
  • 9
  • 101
  • 182
1

Unless you are doing something very specialized, Core Data will probably be the best fit. Keep in mind though that Core Data is not a relational database.

Here are a few other links to help you decide:

Also if you decide to go the SQLite route, FMDB is a good objective-C wrapper.

Community
  • 1
  • 1
christo16
  • 4,843
  • 5
  • 42
  • 53
0

"Big data" typically refers to data sets with sizes beyond the ability of commonly used software tools to capture, curate, manage, and process the data within a tolerable elapsed time. Mobile devices will never work directly with big data -- they will work with subsets of the data, usually through some web service. The entirety of the data set will never be stored locally though. You are typically talking about terabytes of information.

When dealing with subsets of the data, though, the approach you use depends on what you are trying to do. Core Data is an object graph and persistence framework, not a relational database. If you need to manage an object graph and changes to that graph, Core Data is usually a great fit. If, however, you want to do complex data mining, you may be better off using SQLite.

Keep in mind, though, that Core Data is heavily optimized for working in a limited amount of memory with a limited amount of processing power; if you are using SQLite you'll need to do much of the management yourself.

From a design perspective, you are much better off using a server to do the heavy lifting -- queries and data mining -- and only pass back the required subset to work with so processing on the mobile device is minimized.

memmons
  • 40,222
  • 21
  • 149
  • 183