Persistent Object Coordinator
Persistent Object Coordinator
A managed object context is presented with a façade by a persistent store coordinator, which combines the managed object model and persistent object stores to make a collection of persistent stores look as a single aggregate store.
It is NSPersistentStoreCoordinator’s object. The link to an NSManagedObjectModel object, which describes the entities in the store, is still present. In the Core Data stack, it is the main component.
While we deal with single stores in many applications, in more complicated applications we may have multiple stores, each of which may hold distinct entities. Managing various stores and presenting the appearance of a single, unified store to its controlled object contexts is the responsibility of the persistent store coordinator. Unless you specifically indicate which store we are interested in, Core Data obtains results from all of them when we fetch records.
Every persistent store has its own properties, such as being read-only, being kept in memory or as a binary, SQLite, or our own implementation of an NSIncrementalStore. To benefit from this flexibility, distinct components of our model can be kept in separate persistent stores.