Working with Table Schemas

This topic describes several ways in which you can work with the table schemas that are created in peer databases.

Peer-to-Peer Synchronization

Peer-to-peer synchronization does not provide automatic initialization of peer databases or create a change tracking infrastructure at each peer. For information about schema and data initialization, see "Initializing a Server Database" in How to: Synchronize Other ADO.NET Compatable Databases. There are no restrictions on schema changes to base tables in peer databases. However, applications must ensure that the commands that select and apply changes are updated if any schema changes occur. For example, if you add a column to a table, the command to insert changes into that table must be updated to include the new column.

In peer-to-peer scenarios, the schema might differ between peer databases. For example, a table schema at the first peer might use numerical column names that are not easy to read. You can use the DbSyncColumnMapping and DbSyncColumnMappingCollection objects to map the columns to more friendly names for other peers.