Database utility class