update database entities