A class for Database functions