How to use a relational database to store all users who belong to a group, and all groups which a user belongs to?
You want three tables for this:


Users with a row per user and whatever details you need
Groups with a row per group and whatever details you need
UsersGroups with a unique combination of UserId, GroupId that only keeps track of relationships


This will let you have as many combinations as you like.