set up database.