Set up database.