moved sql code to DBUtil package