Chinaunix首页 | 论坛 | 博客
  • 博客访问: 251810
  • 博文数量: 47
  • 博客积分: 7052
  • 博客等级: 少将
  • 技术积分: 1155
  • 用 户 组: 普通用户
  • 注册时间: 2005-02-19 23:32
文章分类

全部博文(47)

文章存档

2011年(2)

2010年(10)

2009年(21)

2008年(14)

我的朋友

分类:

2009-07-08 14:53:08

Sync Services Schemas

The data handled by the Sync Services framework must be described by a sync schema that details the specifics about the data handled by the sync engine. These models are entity-relationship models and follow the same concepts used by the Core Data framework. These concepts are:


Entity An entity describes a discrete unit of data. For example, a person, a bookmark, or a to-do item. The name of each entity managed by Sync Services must be unique. For example, com.apple.contacts.PhoneNumber

Attribute An attribute represents a component of an entity. For example, a person entity would have a first name and a last name attribute. These are usually simple types like strings or numbers, or collection types such as arrays and dictionaries. 

Relationship A relationship describes an connection that an entity can have to other entities. These relationships can be optional or required as well as one-to-one or one-to-many. For example, a relationship can specify that a contact can have multiple phone numbers and require that every number have an associated contact. 

Data Class A data class is a logical grouping of related entities, typically one that makes sense to a user. For example, a group of contacts. 
写Sync应用,首先要理解以上4个术语,这四个术语用于构建同步的schema.只有充分理解,方能写出正确的schema
阅读(694) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~