Creating and configuring the database