change some db api to simple use