Core Data is a framework that lets you express what your model objects are and how they are related to one another. This collection of model objects is often called an object graph, as the objects can be thought of as nodes and the relationships as vertices in a mathematical graph. Core Data takes control of the lifetimes of these objects, making sure the relationships are kept up to date. When you save and load the objects, Core Data makes sure everything is consistent.
Often you will have Core Data save your object graph to a SQLite database. Developers who are used to other SQL technologies might expect to treat Core Data like an object-relational mapping system, but this mindset will lead to confusion. Unlike an ORM, Core Data takes complete control of the storage, which just happens to be a relational database. You do not have to describe things like the database schema and foreign keys – Core Data does that. You just tell Core Data what needs storing and let it work out how that is represented on the filesystem.
Core Data gives you the ability to fetch and store data in a relational database without having to know the details of the underlying storage mechanism. This chapter will give you an understanding of Core Data as you add persistence to the Photorama application.