Building the Database class.