> I have two tables A and B which satisfy various foreign key constraints
> ( A to B AND B to A).
[quoted text clipped - 3 lines]
> there is no way of achieving this without violating a foreign key
> constraint in the process.
MaxDB can't handle deferred constraint checking. Your only chance would
be to
- INSERT INTO A (keycol, bref) VALUES ('a', NULL)
- INSERT INTO B (keycol, aref) VALUES ('b', 'a')
- UPDATE A SET bref = 'b' where keycol = 'a'
or perhaps more general:
- INSERT all rows without references
- UPDATE all rows with their respective references
if you have truly complex cycles, because you don't have to care about
the order of INSERTS.
An even more general solution would be to have a second column with the
reference, which isn't specified as a CONSTRAINT.
You could then patch all the references for each table with one UPDATE
for each table. Using TEMP tables instead to preserve space is left as
an exercise to the reader.
Daniel Dittmar
P.S. You have generally a much better chance of getting qualified
information on MaxDB if you post to maxdb@lists.mysql.com
(http://lists.mysql.com/#maxdb) or
nntp://news.gmane.org/gmane.comp.db.maxdb (if you prefer access as a
newsgroup).

Signature
Daniel Dittmar
SAP Labs Berlin
daniel.dittmar@sap.com