Added update_photos function to do incremental update of photo database