Difference between Core Data and SQLite

Viewed 30913

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?

6 Answers

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.

SQLite is a database while Core Data is not. Core Data is a framework which manages an object graph. Core Data is fast in terms of operation. It don't hit the database every time for operations. Whereas SQLite interacts with the database every time for operations. Core data keeps the operations in primary memory i.e cache so it works fast.

Related