I have an application where the user can create a task. The task in turn can be public or private. If it's public, other users can view it and favor it. That is, many users can favor the same task.
I thought about creating a third table, called Favorites. In this table I will have two fields, User_id
(which is the face that favored the task) and Task_id
(which is the favorite task.
When I need to show this I filter via code. Are you sure this or do you suggest something better?