Subject | Re: [firebird-support] row reference count |
---|---|
Author | Helen Borrie |
Post date | 2003-11-18T12:32:21Z |
At 12:00 PM 18/11/2003 +0000, you wrote:
the master is deleted but it won't won't delete the master row if details
are deleted. You would have to add your own triggers to make that happen.
what transaction isolation is for.
h.
>how to check, is row referenced in other tables via FK? I haveThat's not what the cascade delete does. It should delete *detail* rows if
>master-detail relation, so when I delete detail row, master row is
>deleted also (set cascade on).
the master is deleted but it won't won't delete the master row if details
are deleted. You would have to add your own triggers to make that happen.
>In most cases this is ok, but sometimesIf the rows were locked, your transaction could not delete them. That's
>need to check, is any reference to erasable row - some tables may be
>locked for changes, so cascading delete would destroy important data
what transaction isolation is for.
>Another question:The engine does that automatically.
>if I execute such delete code:
>delete from table where "Name"="John";
>how in trigger to check, that matching row (say, that PK is "Row_ID"
>column) is referenced in other tables via FK?
h.