update db collection logics