Vilsol
09/05/2024, 10:38 PMUser
, Team
and Project
. A User
can be assigned to a Team
, and a Team
can be assigned to a Project
.
Let's say we create a User
called Bob
and assign him to the Team
of Engineers
. I get back a token after writing the relationship. Where do I store that in SQL? Alongside Bob
or Engineers
?
Now imagine we assign 10 other users to Engineers
(same as Bob
). And then assign Engineers
to the Project
of Dollhouse
. Now, do I have to store the token alongside every single User
who is assigned to the Engineers
Team
?
Same as when we delete Dollhouse
or un-assign Engineers
from it.
This also gets a lot more complex if the Team
can be recursive (call it Folders
if you will)