|Subject||Re: [Firebird-Architect] Order of check triggers for foreign keys|
> > > It's working - that is, at the end of the delete of theAha. Indeed, this I would not expect :-)
> > > record in the referenced table, everything is consistent
> > > again. There is a point in the middle of the verb when
> > > referencing records can notice that they're orphaned.
> > > That's not great.
> >Exactly when, and why?
> The child (aka referencing) table has a pre-delete trigger
> which does a lookup on the parent (aka referenced) table
> using its foreign key value. If the parent record exists,
> the trigger logs 'found it!'. If not, it logs 'Where''s Mommy?',
> or something like that. Since the child delete is done
> after the parent is gone, there's lots of whimpering going
> on in the log.
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL