Answer the question
In order to leave comments, you need to log in
What is the best way to update data in a crosstab?
For example, there is a table users: id, name and a table groups: id, name (users can have many groups), they are connected by a cross-table users_groups: user_id, group_id.
What is the best way to update groups for a specific user (users_groups table)? For example, there is a user with id 1, he is included in 3 groups with id 5, 10, 20. And if I imagine that in some application I remove one group from this user and leave only groups with id 5 and 20, then what is the best just update the users_groups table?
I understand that the question may seem too simple, but only some bicycles appear in my head about this, I think that there is a very concise solution to this problem.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question