Created a class for database processing.