CoreData用語集
2007/03/30 (Fri) 22:07:46 JST
Core Data Glossaryの翻訳です。
http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdGlossary.html
- 属性 (attribute)
- エンティティ特有のプロパティ (Employeeオブジェクトのファーストネームなど) 。
- core data stack
- The ordered collection of objects from a managed object context, through a persistent object store coordinator, to a persistent store or collection of persistent stores. A stack is effectively defined by a persistent store coordinator―there is one and only one per stack. Creating a new persistent store coordinator implies creating a new stack.
- エンティティ (entity)
- Model-View-Controllerデザインパターンの "Model" に相当。エンティティを構成する要素には属性 (attribute) と、他のモデルを参照するリレーションシップ (relationship) があります。属性、リレーションシップのどちらもプロパティとして扱われます。エンティティと管理オブジェクトは、クラスとインスタンスに対応します。データベースで言えば、表 (テーブル) と行 (レコード) に対応します。
- fault
- A placeholder object that represents an object that has not yet been loaded from an external data store. A fault may represent a single object in the case of a to-one relationship, or a collection in the case of a to-many relationship.
- faulting
- Transparent loading of objects on demand from an external data store.
- fetch
- To retrieve data from a persistent store―akin to a database SELECT operation. The result of a fetch is the creation of a collection of managed objects that are registered with the managed object context used to issue the request.
- fetch request
- An instance of ?NSFetchRequest that specifies an entity and optionally a set of constraints, represented by an NSPredicate, and an array of sort descriptors (instances of ?NSSortDescriptor). These are akin to the table name, WHERE clause, and ORDER BY clauses of a database SELECT statement respectively. A fetch request is executed by being sent to a managed object context.
- fetched property
- A property of an entity that is defined by a fetch request. Fetched properties allow a weak, unidirectional relationship. An example is a dynamic iTunes playlist, if expressed as a property of a containing object. Songs don’t "belong" to a particular playlist, especially when they’re on a remote server. The playlist may remain even after the songs have been deleted or the remote server has become inaccessible. (Consider also a Spotlight live query.)
- inserting
- The process of adding a managed object to a managed object context so that the object becomes part of the object graph and will be committed to a persistent store. A managed object must be inserted into a managed object context before it is considered part of the object graph. A managed object context is responsible for observing changes to managed objects (for the purposes of undo support and maintaining the integrity of the object graph), and can only do so if new objects are inserted.
- ?KeyValueCoding (key-value coding)
- オブジェクトのプロパティに間接的にアクセスする仕組み。
- 管理オブジェクト (managed object)
- NSManagedObjectかそのサブクラスのインスタンス。生成後は管理オブジェクトコンテキストに登録する必要があります。
- 管理オブジェクトコンテキスト (managed object context)
- ?NSManagedObjectContextのインスタンス。?NSManagedObjectContextは単一の「オブジェクトのスペース」もしくはスクラッチパッドとして動作します。このクラスの主な役割は管理オブジェクト群の管理です。管理オブジェクト群は、永続化ストアに対して整合性を持つモデルオブジェクト群を形成します。管理オブジェクトコンテキストは強力なオブジェクトであり、管理オブジェクトのライフサイクルの中心的役割を果たすほか、フォールティングを含むライフサイクル管理から検証、逆方向のリレーションシップの操作、アンドゥ・リドゥを担当します。
- 管理オブジェクトモデル (managed object model)
- ?NSManagedObjectModelのインスタンス。?NSManagedObjectModelはアプリケーションで使うエンティティ (データモデル) をまとめます。
- object graph
- A collection of interrelated objects. In Core Data, an object graph is associated with a managed object context. Moreover, when using Core Data, the object graph may be incomplete, with the edges represented by faults.
- optimistic locking
- You can consider optimistic locking to be akin to specifying a WHERE clause in a database UPDATE statement... WHERE clause determined by constituents of snapshot(s) corresponding to object(s) being updated.
- persistent store
- A file or collection of files in which objects may be stored. The file may be XML, binary, or a SQL database. The store format is transparent to the application.
- persistent store coordinator
- An object that is an instance of ?NSPersistentStoreCoordinator. A coordinator associates persistent stores and a configuration of a managed object model and presents a facade to managed object contexts such that a group of persistent stores appears as a single aggregate store.
- primitive accessor
- An accessor method that gets or sets a variable directly, without using custom accessor methods. Primitive accessors are typically used to initialize an object’s variables when it is fetched from a persistent store. In this way, any side effects from custom accessors are avoided.
- property
- A component of an entity that is either an attribute or a relationship. Properties are to entities what instance variables are to Classes.
- refault
- Turn an object into a fault. The next time it is accessed, its variables may be refetched from the relevant persistent store, depending on the caching mechanism.
- relationship
- In one entity, a reference to one instance of another entity (a to-one relationship) or to a collection of instances of another entity (a to-many relationship). For example, an Employee object’s manager is an example of a to-one relationship.
- snapshot
- A record of the state of an entry fetched from a persistent store at the time is it fetched. The information in a snapshot is used to support the framework’s optimistic locking mechanism. In some persistent stores it is also used when changes are committed back to a data source to update only the attributes that were changed since the last fetch.
- transient property
- A property of an entity that is not saved to a persistent data store, but which is recorded for undo and redo operations in memory.
- uniquing
- Ensuring that an object graph does not have multiple objects representing the same entry in a persistent store. Core Data accomplishes uniquing by using the information it maintains in the mapping of each managed object to its corresponding entry in a persistent store.
- validation
- The process of ensuring that a property value is valid―for example, that it is of the correct type, and its value lies within a prescribed range. The Core Data framework provides an infrastructure to allow values to be tested for validity before they can be applied to an object. There are three aspects to validation: model-based validation, attribute validation using custom validation methods, inter-attribute validation (consistency checking) for update, insert, and delete.
Inverse Pages: CDPGIntroduction CoreData