>
> What does PENDANT imply/mean in terms of RI? I could figure out all of the
> other syntax.
As far as I understood it:
CREATE TABLE t1 (a1 integer PRIMARY KEY NOT NULL, b1 text);
CREATE TABLE t2 (a2 integer NOT NULL, b2 text,
CONSTRAINT check_a2
FOREIGN KEY (a2)
REFERENCES t1 (a1)
PENDANT
ON DELETE CASCADE
ON UPDATE CASCADE
INITIALLY DEFERRED);
This setup requires, that for each key in t1.a1 at least one
reference from t2.a2 MUST exist. So this is a cyclic
integrity check. I'm not sure if removing the last reference
automatically removes the PK row from t1 or if it raises an
error. Can someone clearify here?
Jan
--#======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #========================================= wieck@debis.com (Jan Wieck) #
************ -- end of forwarded message --
-- С тем, что не помешает никогда, Kittle