Writing to database complete.