update database according to new autocompletion