Setting up the database