<!--
{
  "documentType" : "article",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/core-data-model",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Core Data model"
}
-->

# Core Data model

Describe your app’s object structure.

## Discussion

In most cases, you describe your app’s data model using Xcode’s data model editor. [`NSManagedObjectModel`](/documentation/CoreData/NSManagedObjectModel) represents the `.xcdatamodeld` file in your project’s source list. This is where you define entities that you use to generate [`NSManagedObject`](/documentation/CoreData/NSManagedObject) subclasses for Core Data to manage.

The entities you create are [`NSEntityDescription`](/documentation/CoreData/NSEntityDescription) instances. Entities’ properties are subclasses of [`NSPropertyDescription`](/documentation/CoreData/NSPropertyDescription), namely [`NSAttributeDescription`](/documentation/CoreData/NSAttributeDescription) for attributes, [`NSRelationshipDescription`](/documentation/CoreData/NSRelationshipDescription) for relationships, and [`NSFetchedPropertyDescription`](/documentation/CoreData/NSFetchedPropertyDescription) for fetched properties.

The various attribute types are enumerated in [`NSAttributeType`](/documentation/CoreData/NSAttributeType).

## Topics

### Objects and entities

[`NSManagedObject`](/documentation/CoreData/NSManagedObject)

The base class that all Core Data model objects inherit from.

[`NSEntityDescription`](/documentation/CoreData/NSEntityDescription)

A description of a Core Data entity.

### Standard attributes

[`NSPropertyDescription`](/documentation/CoreData/NSPropertyDescription)

A description of a single property belonging to an entity.

[`NSAttributeDescription`](/documentation/CoreData/NSAttributeDescription)

A description of a single attribute belonging to an entity.

[`NSAttributeType`](/documentation/CoreData/NSAttributeType)

The types of attribute that Core Data supports.

[`NSRelationshipDescription`](/documentation/CoreData/NSRelationshipDescription)

A description of a relationship between two entities.

### Computed attributes

[`NSCompositeAttributeDescription`](/documentation/CoreData/NSCompositeAttributeDescription)

A description of an attribute that derives its value by composing other attributes.

[`NSDerivedAttributeDescription`](/documentation/CoreData/NSDerivedAttributeDescription)

A description of an attribute that derives its value by performing a calculation on a related attribute.

### Fetched properties

[`NSFetchedPropertyDescription`](/documentation/CoreData/NSFetchedPropertyDescription)

A description object used to define which properties are fetched from Core Data.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)