Publication design for Adaptive Server Anywhere
Onceyou understand how to create simple publications, you must think
aboutproper publication design. Sounddesign is an important part of
buildinga successful SQL Remote installation. Thissection helps set out the
principlesof sound design as they apply to SQL Remote for Adaptive Server
Anywhere.
Similarmaterial for Adaptive Server Enterprise
Many of the principles of publication design are the same for Adaptive
ServerAnywhere and Adaptive Server Enterprise, but there are differences
in commands and capabilities. There is a large overlap between this
sectionand the corresponding section for Adaptive Server Enterprise users,
“Publicationdesign for Adaptive Server Enterprise” on page 147.

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.
102