Database class preparation