Extract DB related functions to DbUtil class