Update DBHelper, add more common functions.