Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
Core Data stack
A Core Data stack is composed of the following objects: one or more managed object contexts connected to a single persistent store coordinator which is in turn connected to one or more persistent stores. A stack contains all the Core Data components you need to fetch, create, and manipulate managed objects. Minimally it contains:
An external persistent store that contains saved records.
A persistent object store that maps between records in the store and objects in your application.
A persistent store coordinator that aggregates all the stores.
A managed object model that describes the entities in the stores.
A managed object context that provides a scratch pad for managed objects.
A stack is effectively defined by a persistent store coordinator—there is one and only one per stack. Creating a new persistent store coordinator implies creating a new stack. By implication, there is therefore only one model, although it may be aggregated from multiple models. There may be multiple stores—and hence object stores—and multiple managed object contexts.
A managed object context is usually connected directly to a persistent store coordinator, but may be connected to another context in a parent-child relationship.