User has a many-to-many relationship to Group
User
Group
The user_groups table looks like this with user ID and group code:
user_groups