update database after tags are edited