数据的访问
SQL CE Replication
l SQL Server replication
Ø Merge replication
§HTTP through IIS virtual directory
§Row and column filtering
§Conflict resolution
Ø Remote Data Access (RDA)
§Simpler than merge replication
§No conflict resolution
§Pull / Update / Push model

| One of the common scenarios mentioned earlier centered on caching data from a remote SQL Server. In many cases, you many manually code the data retrieval and update system. This is typically done when you are not able or willing to implement SQL Server Replication. However, in more complicated scenarios where many users need access to different parts of the data or when there is the potential or update conflicts, you may want to consider using SQL Server Replication to handle the data synchronization between the device and the remote server. SQL CE support two types of replication: Merge and Remote Data Access. Both of the mechanisms require that you configure SQL Server and IIS for replication on the server, because they use HTTP for communication.
| Merge Replication is the more advanced option of the two and allows data to be exposed through publications that partition data horizontally and/or vertically. For example, you could setup two partitions on the server, named NorthEastCustomers and SouthEastCustomers, that each expose different sets of customer data. One device could subscribe to the NorthEast partition and another could subscribe to the SouthEast partition, ensuring that the two would never update each other’s data. A major benefit of Merge Replication is that you can define server-side conflict resolution rules, thereby reducing the need for client resolution code.