Once the data has been written it is time to close the database and free any resources associated with the database handle.