Difference between Core Data and SQLite

29,853

Solution 1

There is a huge difference between these two.

SQLite is a database itself like we have MS SQL Server.

But Core Data is an ORM (Object Relational Model) which creates a layer between the database and the UI. It speeds-up the process of interaction as we don't have to write queries, just work with the ORM and let ORM handles the backend.

For saving or retrieving large data, I recommend to use Core Data because of its abilities to handle the lower processing speed of iOS devices. Hope this helps.

@Arundhati: Using Core Data we can optimize the memory efficiently.

Regards.

Solution 2

Apart from being ORM (Object Relational Model) You can compare Core-Data and SQLite as;

SQLite:

  • Have Data Constrains feature.
  • Operates on data, stored on disk.
  • Can Drop table and Edit data without loading them in memory.
  • Slow as compared to core data.

Core Data:

  • Don't have Data Constraints,if required need to implement by business logic.
  • Operates on in memory.(data needs to be loaded from disk to memory)
  • Need to load entire data if we need to drop table or update.
  • Fast in terms of record creation.(saving them may be time consuming)

Additionally apart from SQLite as back-end Core data can use XML or binary format for storing data to disk.

Solution 3

There is a big difference between coredata and sqlite.

Core data in itself is not a database it is just a change tracking system a wrapper over the persistent stores like SQLite(retrive, save objects to the persistent store). You can have SQLite as your underlying RDBMS and coredata can be used as a layer for managing the change to the properties of the tables (undo, redo, reset the changes), it is also optimized in managing the memory(faulting).

Solution 4

Core Data:

  1. Not a database, its a framework for managing object graph (collection of interconnected objects)
  2. It uses SQLite for its persistent store.
  3. Framework excels at managing complex object graphs and its life cycles.
  4. It can optionally persist the object graph to disk and it also offers a powerful interface for searching the object graph it manages.
  5. The framework adds a number of other compelling features, such as input validation, data model versioning, and change tracking.
  6. It has also other Persistent store types like binary store and an in-memory store
  7. Important: The database schema of the SQLite database used by Core Data is an implementation detail of the framework. It isn't publicly documented and liable to change.

SQLite:

  1. Relational database
  2. Lightweight DB and stored on disk
  3. SQLite does not require a separate server process or system to operate.
Share:
29,853

Related videos on Youtube

TalaT
Author by

TalaT

Updated on July 09, 2022

Comments

  • TalaT
    TalaT almost 2 years

    What is the basic difference between Data and SQLite, as both are databases and can be used with iOS development. Which is better for saving and retrieving large data?

  • MobileApp Developer
    MobileApp Developer about 12 years
    Additional to above , using core data we can optimize the memory efficiently.
  • shim
    shim over 4 years
    Note: Core Data does not have to use SQLite for its persistent store.
  • Michael Hulet
    Michael Hulet about 2 years
    Core Data is an ORM, but it's far more than just an ORM, too