Publications
Page 2 of 7

Publication Basics

A publication defines the part of a source database to be shared with a certain set of targets. This can include application logic stored in the source database. It may also define database properties that do not exist at the source. A source database may contain any number of publications, each used with a different set of target databases.

A publication is created with a CREATE PUBLICATION statement on the source database. The COPY PUBLICATION statement, also run at the source, uses an existing publication to create a copy file. A target database is created from the copy file.

You can use a single publication to create any number of copy files, and you can use a single copy file to create any number of target databases. Once you have created all the targets you want from a copy file, you can delete it.

NOTE: Since a publication defines a target's dictionary objects, no DDL (e.g., CREATE TABLE) statements are permitted at a target.

A publication may contain parameters. You can specify the values for the parameters when the copy file is created. This allows a single publication to be used to create different target databases, each containing the same dictionary objects but only the subset of the data relevant to that target.

A publication can also contain jar files. This lets you distribute and manage target application code as well as the Java objects stored in target database user tables. Like changes to data, changes to application code can be distributed to any target in the synchronized system.

A publication can also contain database properties that do not exist at the source. This makes the target database more flexible.

You can alter a publication by issuing ALTER PUBLICATION at the source database. The changes you make with ALTER PUBLICATION are propagated to a subscribing target when it synchronizes with the source.

See CREATE PUBLICATION, COPY PUBLICATION, DROP PUBLICATION, and ALTER PUBLICATION for the complete specifications of the statements that create, copy, drop, and alter publications.

See Sample Code for Creating a Synchronized System for an example of creating and copying a publication.