The best way to compare tables?

Good time of day.
I'm new to PostgreSQL and I have following question:
There are two tables users and groups. Accordingly, users can belong to groups. And here the question of how better data in the table to compare with each other?
Option 1 - create separate table users_in_group
Option 2 - to create in the table field group Array, and to make users.
Prompt please, whether to consider the second option, and what is their fundamental difference?
June 26th 19 at 14:20
2 answers
June 26th 19 at 14:22
Solution
The user can simultaneously be in multiple groups?
If Yes - make a table like:
User_ID||Group_ID
If a user can belong to only 1 group, then just add USERS table column Group_ID and write down the group ID to which the user belongs.
June 26th 19 at 14:24
There is another option: the group list which is stored in each user.

Ispolzuyte the option which will give the minimum required effort (cost) for your particular problem.

Find more questions by tags PostgreSQLSQL