I have a problem with design an entity to entity relation in my SQL database.
I have an entity that acts as a ‘group’. And all groups has a relations to each other.
As an example:
GroupA and GroupB has a relation from groupA to groupB and vice versa with a bool.
It is like a 2D matrix:
Name | GroupA | Group B |
Group A | true | false
Group B | false | true |
The groups are dynamic, may there are more or less groups.
Now, how should I store this in my database?
Sorry for my bad english, and I hope someone understand what I mean 🙂
You need two table:
So you can define any connection in the GroupToGroup.