Chapter 8. SQL Remote Design forAdaptive Ser verEnter prise
Publication design for Adaptive Server Enterprise
Onceyou understand how to create simple publications, you must think
aboutproper design of publications. Thissection describes the issues
involvedin designing publications, and how to take steps towards sound
design.

Design issues overview

Eachsubscr iption must
bea complete relational
database
Aremote database shares with the consolidated database the information in
theirsubscriptions. Thesubscription is both a subset of the relational
databaseheld at the consolidated site, and also a complete relational
databaseat the remote site. Theinformation in the subscription is therefore
subjectto the same rules as any other relational database:
Foreignkey relationships must be valid Forevery entry in a foreign
key,a corresponding primary key entry must exist in the database.
Thedatabase extraction utility ensures that the CREATE TABLE
statementsfor remote databases do not have foreign keys defined to
tablesthat do not exist remotely.
Primary keyuniqueness must be maintained There is no way of
checkingwhat new rows have been entered at other sites, but not yet
replicated. The design must prevent users at differentsites adding rows
withidentical primary key values, as this would lead to conflicts when the
rowsare replicated to the consolidated database.
Transactionintegrity
mustbe maintained in
theabsence of locking
Thedata in the dispersed database (which consists of the consolidated
databaseand all remote databases) must maintain its integrity in the face of
updatesat all sites, even though there is no system-wide locking mechanism
forany particular row.
Lockingconflicts must be prevented or resolved In a SQL Remote
installation,there is no method for locking rows across all databases to
preventdifferent users from altering the rows at the same time. Such
conflictsmust be prevented by designing them out of the system or must
beresolved in an appropriate manner at the consolidated database.
Thesekey features of relational databases must be incorporated into the
designof your publications and subscriptions. Thissection describes
principlesand techniques for sound design.

Conditions for valid articles

Allcolumns in the primary key must be included in the article.
147