Finish DB writer and its test(as a main function) for transaction oppo writer