Sqlite vs Core Data

Discussion in 'iOS Programming' started by AndyCodez, Nov 24, 2009.

  1. AndyCodez macrumors regular

    Aug 6, 2009
    I've been thinking about this lately. What makes one better than the other? I see many people using Core Data because its Apples new toy. Now I've never done Mac OS programming so I didn't have any exposure previously to it. At work I do a alot of SQL scripting/quering.

    I personally prefer justing using the sqlite library, because i already know how to get/create the data required for the application I'm writing.

    The question is which one is "Better" per say. I mean is Core Data More efficient? Core Data uses a sqlite database back-end, so wouldn't it be primarily the same?

    I started to look at learning the Core Data libraries but i just went back to old faithful on two projects.

    What are your thoughts?
  2. kainjow Moderator emeritus


    Jun 15, 2000
    I'm not an expert on Core Data, but it's basically a Cocoa wrapper around SQLite and other data formats in a much more OOP way that integrates nicely with your application. Whereas if you're doing it yourself you're going to have to maintain your own SQLite wrapper code (fun with SQL syntax) and write your own wrapper objects, etc.

    I'd suggest looking into Core Data and trying it out. It is different and makes you change your way of thinking, but may be worth it.

    Also it works even more closely with the UI in OS X if you ever wanted to port your app :)
  3. admanimal macrumors 68040

    Apr 22, 2005
    I was a Core Data skeptic at first; my first app used SQLite and Core Data seemed overly complicated. However, after messing with it a bit and getting the hang of the basics, I used it in my most recent app and I have to say I am a Core Data fan now. It really cuts down on the amount of tedious SQL code you have to write/debug.
  4. AndyCodez thread starter macrumors regular

    Aug 6, 2009
    Yeah you both make good points. I think I will have to read into it ALOT more. I use SQL every day at work so its just second nature with queries. I'll just make sure instead of trying to redo my current app in core data but start smaller. Because what I have read I found it to be very confusing at first look.

Share This Page