![]() |
Publications
|
|
Publishing Foreign KeysForeign key constraints are not implicitly included in a publication. However, even if a foreign key on the source is not published to a target, the source still rejects all changes from that target that violate the foreign key. To enforce a foreign key at the target as well as the source, you must publish the foreign key. To do this, use the ADD FOREIGN KEY clause of CREATE PUBLICATION or ALTER PUBLICATION. A foreign key that is valid for one set of data in a database may be invalid for a subset of that data. Because a target is typically a subset of the source, a foreign key may be invalid on a target even if it is valid on the source. Therefore, if a publication contains a foreign key, and if the target data would violate the foreign key if the target database were created, COPY PUBLICATION fails. If COPY PUBLICATION succeeds, the foreign key is enforced on the target until the foreign key is dropped from the publication. Be careful when publishing foreign keys, or you may create a target that cannot refresh. See Handling Published Foreign Keys for information on how to safely design publications containing foreign keys. |
|
![]() Cloudscape Version 3.6 For information about Cloudscape technical support, go to: www.cloudscape.com/support/.Copyright © 1998, 1999, 2000 Informix Software, Inc. All rights reserved. |