delete not existing records, and change changed ones.