Relations to users and chats

Hi forum,
I am having a mental block on relations. I am building a chat and want to allow a user to be able to make a group chat.
would that be
one user to many users?
or one chat with many users?

It would be a many-to-many relationship. Users can be a part of multiple chats and chats can have multiple users.

ok. i think. and this is for one user to make a group chat?

flawless i have a question just for clarity. is it many to many(m:M) because any user can make the “group” chat. for some reason i feel like it’s one to many(1:m) because the one user can make the chat but than many users can participate in the group chat.

like if you made a group chat it would be flawless group chat but many can enter. am i looking at that relationship wrong?

You’re correct. You can have multiple relationship parameters for that use case. one-to-many for group creator and many-to-many for group users.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.