Added some code to try to update a local copy of the database, and then persist it in sections.