MAID-10: replace leveldb with sqlite