generate groups DB