NX-526: Simplified TX handling

Doing 2 passes, one to perform needed DDL
and another to actually perform insertions.