update database for groups