Added database transactions