Core Data Study Notes

Source: Internet
Author: User

Learning route:

Core Data tutorial for ioscore
Data utility tutorialcore
Data programming guid
Code: coredatabooksCore
Data model versioning and data migration programming guideatomic
Store programming topicsincremental
Store programming guide Xcode tools for core data
Xcode mapping tool for core data
Cocoa bindings programming topics



??? : To implement the effect of some select fields, use: nsexpression's expressionforkeypath: And nsexpressiondescription?
[Fetchrequest setpropertiestofetch: [nsarray arraywithobject: expressiondescription];



Context-‐- ‐> coordinator-‐- ‐> Model



1. Managed Object Model Is an object representation of a schema that describes
Your Database
Is a collection of Entity description objects (instances of nsentitydescription ).


2. A Persistent object store represents an external store (File) of persisted data
When you fetch records, core data retrieves results from all of them (unless you specify which store you're interested in ).
3. A managed object is
Object Representation of a record in a table in a database
A managed object is associated with an Entity description (an instance of nsentitydescription) that
Provides metadata about the object (including the name of the entity that the object represents and the names of its attributes and Relationships)

4. The managed object context manage
A collection of managed objects. These objects form a group of related model objects that represent an internally consistent view of one or more persistent stores.
5. An entity can be used to store different stores .. you specify the store for an object using the nsmanagedobjectcontext method, assignobject: topersistentstore :.


Transient properties are properties that you define
As part of the model, but which are not saved to the persistent store as part of an entity instance's data.
An attribute is optional-that is, it is not required to have a value

Fetched properties represent weak, one-way relationships
Cross stores.
Relationships represent to-specific relationship cannot be cross stores.

Faulting: a managed object may be a "fault"-an object whose property values have not yet been loaded from the external
Store

When you fetch a managed object, core data does not automatically fetch data for other objects to which it has relationships

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.