Database class setup