Core-Data Vs SQLite in iOS
1770
15-Nov-2015
Updated on 22-Sep-2020
Tarun Kumar
15-Nov-2015- It allowing an app to work with a graph that would not entirely fit into memory by faulting objects in and out of memory as necessary.
- Core Data also manages constraints on properties and relationships and maintains reference integrity (like: keeping forward and backwards links consistent when objects are added/removed to/from a relationship).
- Core Data is thus an ideal framework for building the "model" component of an MVC architecture.
- To implement its graph management, Core Data happens to use sqlite as a disk store. It could have been implemented using a different relational database or even a non-relational database such as CouchDB.
- As others have pointed out, Core Data can also use XML or a binary format or a user-written atomic format as a backend (though these options require that the entire object graph fit into memory).