Revert "create TM from db, writer to xtm, load xtm to db, query"

This reverts commit 9c97149855f3716312b1aeef1e534af2d1af5b73.
Revert "Revert "create TM from db, writer to xtm, load xtm to db, query""

This reverts commit da481376ddf00c1bff5df1729c4fef0f271ca630.
Merge remote-tracking branch 'origin/master'