< Previous PageNext Page > Hide TOC

Basic Concepts

This article describes some of the considerations involved in creating different versions of your application, and discusses those aspects for which Core Data provides support.

Typically, as it evolves from one version to another there are numerous aspects of your application that change: the classes you implement, the user interface, the file format, and so on. You need to be aware of and in control of all these aspects; there is no API that solves the problems associated with all these—for example Cocoa does not provide a means to automatically update your user interface if you add a new attribute to an entity in your managed object model. Core Data does not solve all the issues of how you roll out your application. It provides support for a small—but important and non-trivial—subset of the tasks you must perform as your application evolves.

Core Data stores are conceptually bound to the managed object model used to create them. Since a model describes the structure of the data, changing a model will render it incompatible with (and so unable to open) the stores it previously created. If you change your schema, you therefore need to migrate the data in existing stores to new version. In general, managing all this yourself can be difficult.

Core Data provides support for model versioning, for mapping from one model to another, and for data migration. Moreover, it provides an infrastructure to support the process of migration, allowing you to focus on the details of conversion that are specific to your domain.

Although Core Data makes versioning and migration easier than would typically otherwise be the case, it is important to understand that these processes are still non-trivial in effect. You still need to carefully consider the implications of releasing and supporting different versions of your application.



< Previous PageNext Page > Hide TOC


© 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-02-08)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.