I already answered this on the devzone forum:
How to update and then delete a record inside of a transaction - ADS Forum
Here is how I understand what's going on:
- The UPDATE statement on the detail table inside the transaction starts an implicit lock on the detail table.
- The DELETE on the master table causes the RI rule to kick in.
- The RI rule can't acquire a lock on the detail table due to the (implicit) lock from step 1.