Collection Contents Index Creating publications Partitioning tables that do not contain the subscription expression pdf/chap7.pdf

Data Replication with SQL Remote
   PART 2. Replication Design for SQL Remote
     CHAPTER 7. SQL Remote Design for Adaptive Server Anywhere       

Publication design for Adaptive Server Anywhere


Once you understand how to create simple publications, you must think about proper publication design. Sound design is an important part of building a successful SQL Remote installation. This section helps set out the principles of sound design as they apply to SQL Remote for Adaptive Server Anywhere.

Similar material for Adaptive Server Enterprise    
Many of the principles of publication design are the same for Adaptive Server Anywhere and Adaptive Server Enterprise, but there are differences in commands and capabilities. There is a large overlap between this section and the corresponding section for Adaptive Server Enterprise users, Publication design for Adaptive Server Enterprise.

Top of page  Design issues overview

Each subscription must be a complete relational database 

A remote database shares with the consolidated database the information in their subscriptions. The subscription is both a subset of the relational database held at the consolidated site, and also a complete relational database at the remote site. The information in the subscription is therefore subject to the same rules as any other relational database:

Transaction integrity must be maintained in the absence of locking 

The data in the dispersed database (which consists of the consolidated database and all remote databases) must maintain its integrity in the face of updates at all sites, even though there is no system-wide locking mechanism for any particular row.

These key features of relational databases must be incorporated into the design of your publications and subscriptions. This section describes principles and techniques for sound design.

Top of page  Conditions for valid articles

All columns in the primary key must be included in the article.

Supporting INSERTS at remote databases 

For INSERT statements at a remote database to replicate correctly to the consolidated database, you can exclude from an article only columns that can be left out of a valid INSERT statement. These are:

If you exclude any column that does not satisfy one of these requirements, INSERT statements carried out at a remote database will fail when replicated to the consolidated database.

Using BEFORE triggers as an alternative    
An exception to this case is when the consolidated database is an Adaptive Server Anywhere database, and a BEFORE trigger has been written to maintain the columns that are not included in the INSERT statement.

Top of page  Design tips for performance

This section presents a check list for designing high performance SQL Remote installations.

Top of page  

Collection Contents Index Creating publications Partitioning tables that do not contain the subscription expression pdf/chap7.pdf