How would you implement complex database transactions with strict consistency requirements in code for allwhere?