Modeling Data

Configure the data model file to contain your app’s object graph.


A data model holds information about your application’s objects and the graph of how objects relate to each other. You provide this information in your project’s .xcdatamodeld file package. To add a data model to your project, see Creating a Core Data Model.

This screenshot shows the data model for an app that displays a feed of earthquake data.

Screenshot showing an .xcdatamodeld file containing a Quake entity with code, magnitude, place, and time attributes.

Model your data by describing your objects as entities, adding their properties as attributes and relationships, and finally generating respective NSManagedObject subclasses to inherit change tracking and life cycle management.


Configuring a Core Data Model

Configuring Entities

Model your app’s objects.

Configuring Attributes

Describe the properties that compose an entity.

Configuring Relationships

Specify how entities relate and how change propagates between them.

Generating Code

Automatically or manually generate managed object subclasses from entities.

See Also

Data Modeling

Core Data Model

Describe your app’s object structure.