Chapter 8. SQL Remote Design forAdaptive Ser verEnter prise
Logentries are values, not subscribers
Although in this case the values entered correspond to subscribers, it is
not a list of subscribers that is entered in the log. The server handles
only information about publications, and the Message Agent handles
all information about subscribers. The values entered in the log are for
comparison to the subscription value in each subscription. For example,
if rows of a table were divided among sales representativesby state or
province, the state or province value would be entered in the transaction
log.
Asubscription-listcolumn is a column added to a table for the sole
purposeof holding a comma-separated list of subscribers. Inthe present
case,there can only be a single subscriber to each row of the Contact table,
andso the subscription-list column holds only a single value.
Fora discussion of the case where the subscription-list column can hold
manyvalues, see “Sharing rows among several subscriptions” on page 157.
Contacttable definition Inthe case of the Contact table, the table definition would be changed to the
following:
CREATE TABLE Contact (
contact_key CHAR( 12 ) NOT NULL,
name CHAR( 40 ) NOT NULL,
cust_key CHAR( 12 ) NOT NULL,
subscription_list CHAR( 12 ) NULL,
FOREIGN KEY ( cust_key )
REFERENCES Customer ( cust_key ),
PRIMARY KEY ( contact_key )
)
go
Theadditional column is created allowing NULL, so that existing
applicationscan continue to work against the database without change.
Thesubscription_list column holds the rep_keyvalue corresponding to the
rowwith primary key value cust_key in the Customer table. A set of
triggershandles maintenance of the subscription_list column.
153