MySQL Forums
Forum List  »  InnoDB

cross-table business validation check at END of transaction
Posted by: Greg Hauptmann
Date: January 23, 2009 09:09PM

Hi,

Is it possible in mysql to implement a cross-table Business Rule check that is applied whenever a record changes in any of tables involved, BUT only have the check occur just prior to the overall database COMMIT?

That is, within the transaction there would be record changes going on that in themselves may cause the business rule to break, but by the time all is done and the commit comes along (in this case from Ruby on Rails) THEN apply the cross table check (e.g. sum to totals in Table X linked to Table Y should be equal, or something like that), and if it doesn't pass trigger a rollback & exception.

Thanks in advance
Greg

Options: ReplyQuote


Subject
Views
Written By
Posted
cross-table business validation check at END of transaction
3798
January 23, 2009 09:09PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.