group queries by table name, use transactions and roll back on error
group queries by table name, use transactions and roll back on error