in reply to DBI and transactions

Your second example is correct. You could also just put the commit inside the eval but after all of the work on both tables.