Core Data Stack in iOS

Posted By : Varun Wadhwa | 10-Apr-2017

Core Data is poweful framework on iOS SDK that allows programmer to store and manage the data in Object Oriented way.

In this I'll explain core data stack : 

Core Data stack  composed of following layers.

1. Managed Object Model

2. Manged Object Context

3. Data Model

4. Persistant Store Coordinator

5. Persistant Object Store

 

 

Managed Object Model : It's collection of entity descrition, think about it as database schema and It represent our data model. NSManagedObjectModel class is use to implement  it.

Managed Object Context : It keep track of all things we are doing with managed objects, it's a like a virtual board. 

Managed Object : Represent the entity we want to store in core data. In swift NSManagedObject instances are use to represent our data.

Persistant Store : The object that represent actual db on disk. It is responsible to persist the data on disk.

Persistant Store Coordinator : It's the object that coordinate reading and writing of infofrom and to persistant store. It act as bridge between Managed object context and persistant store.

 

Thanks

About Author

Author Image
Varun Wadhwa

Varun is a mobile developer with experience in various technologies like Titanium , Cordova and native iOS development.

Request for Proposal

Name is required

Comment is required

Sending message..