Implemented code to test database insert transaction