Database Reference
In-Depth Information
Figure 11-14. Database changes
Let's take a quick look at the four system synchronization tables the SQL Azure Data Sync created:
schema_info. Tracks member schema information.
scope_config / scope_info. Used by the Sync Framework to determine what
tables, filters, and so on are being synchronized. Each database that is
participating in a sync includes these tables and includes at least one scope (if
they're being synchronized).
Users_tracking. Tracks changes to the Users table.
Each relationship has its own scope—thus the need for the scope tables. For example, the hub-to-
Member1 relationship has a scope, and the hub-to-Member2 relationship has its own, different scope.
Just like sync groups, these scopes define the data to be shared among members; multiple scopes make
up a sync group. Scopes aren't exposed in order to simplify management of the Data Sync Service.
In this example, four tables were created, but keep in mind that a tracking table is created for each
table included in the sync. For example, had you included the Docs and UserDocs tables in the sync, you
would also see Docs_tracking and UserDocs_tracking tables. Each tracking table is responsible for
storing the changes for its respective table.
Also added, but not shown in Figure 11-14, are triggers . A trigger is added to each base table that
updates the tracking table when a change occurs. Some stored procedures are also added to each
database; the Data Sync Service uses them to efficiently get and apply changes.
Search WWH ::




Custom Search