Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7007623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:37:52+00:00 2026-05-27T21:37:52+00:00

I’ve been programming for the iPhone for about 2 years now, and as part

  • 0

I’ve been programming for the iPhone for about 2 years now, and as part of the applications I have programmed I’ve used SQLite and Core Data for persistence, however there are some cases where one is better and more optimised as a solution then the other, firstly I would like to stress that I am fully ware that Core Data is not and was not designed to be a RDBMS as is SQLite, however the APIs are very handy and you can get some real benefits from using it.

So across my applications I’ve used SQLite directly with no wrapper, and I didn’t really enjoy interacting directly with the C functions within my lovely OO app.

Then I decided to learn Core Data for two reasons, firstly I wanted to familiarise myself with this framework as it is a very useful and present framework within the iOS developing environment and in terms of my career I wanted to ensure that I knew this framework, but also at a first glance it seemed like the perfect solution for my application.

In a nut shell it was an app where the user generated their own content, so creating data sets based on user interaction was quite satisfyingly achieved with Core Data, but then another layer got added to my application which was some sort of remote API sync, so now I had an remote API endpoint that could tell me some data from other users, then I had to save this to the app and refresh, update etc from the remote source from time to time, but as soon as I started integrating the concept of downloading batches of data from the remote source, I realised that Core Data wasn’t really as great as I hoped, so for example my application needed a login and then I would load your friends data from the remote source (based on Facebook friends using this application). So when I log out from the application, I would have to pass on all the objects in the Core Data store and delete them, because assuming the next login is by a different user, you wouldn’t want to show that user the previous users friends information.

There was one feature of Core Data I loved and that was the Fetched Results Controller for table views, this worked great and optimised to the max the object faulting etc…

However the problem still remained about the remote sync, downloading batches of data and saving then one by one, the deleting them to keep up to date, seemed like a lot of looping, loading and operations, especially when you consider that this would only be one SQL command to delete all the records of your friends if I had chosen SQLite for this…

So my question is, according to you what are the optimal contexts when Core Data should be preferred to SQLite and vice versa, to kick off and I’m still trying to really figure tho one out, I made a short list of apps and what I think they use:

• FaceTime for mac: it seems the data store for all the calls / missed calls, call duration, favourites, would be Core Data.

• Twitter iOS app: given the enormous set of data that a user could have in this app, I an guessing that it uses SQLite, however I could be wrong…

It seems to me that you would consider Core Data more in a user content generation scenario, and an SQLite solution in a more large set/remote data sync scenario, but sometimes these two scenarios come together in the same application, I do know of some developers mixing and matching both in the same application but I would like to get your take on this, and could anyone say for any particular apps they know one or the other is being used, as a matter of curiosity.

Lastly I am aware or other Stack Overflow questions titled “Core Data vs SQLite” etc but this is really about analysing it, thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:37:52+00:00Added an answer on May 27, 2026 at 9:37 pm

    So when I log out from the application, I would have to pass on all the objects in the Core Data store and delete them, because assuming the next login is by a different user, you wouldn’t want to show that user the previous users friends information.

    Why wouldn’t you associate the data you downloaded from your remote store with a User entity? Then, you wouldn’t have to delete the data, rather you’d just fetch the new user’s data?

    Twitter iOS app: given the enormous set of data that a user could have in this app, I an guessing that it uses SQLite, however I could be wrong…

    Core Data is really good when dealing with large data sets. I built an app once that had 120k records in the DB and Core Data handled it like a champ—provided you fully understand how it works and how to optimize your fetches. For this information, be sure to see the related WWDC videos and docs.

    Overall, I think that Core Data can handle the majority of use cases you can throw at it. Also, don’t assume that it can’t simply because you don’t see how it would—it will surprise you. In test I’ve ran, I’ve found Core Data to be faster than native SQL Code because of the caching mechanisms it uses. Always base your design decisions regarding Core Data with tests you’ve run on instruments. Just this morning I found out that something I thought would be less efficient actually was faster than doing it the “right” way.

    Bottom line, if you run your app in instruments and become obsessive about optimization—based on your instruments results, not your gut—Core Data will fit most any bill.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I used javascript for loading a picture on my website depending on which small
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.