code to make the database