optimized makeUpdate and makeInsert in DB layer