This problem has been in my head for a while and I can't seem to understand the logic when I find solutions.
Heres the deal: I'm currently working on a simple application that has been split up into 2 microservices. The application is very similar to the task of managing software Trello. There's a microservice solely used for storing User information (User service) Another microservice is responsible for the Boards (Boards hold lists and lists hold tasks but that's not relevant to my question). Both microservices use their own database. All of this will be hosted on AWS, the code is written in Java and I use Hibernate to generate the databases.
My problem: How do I make use of the User service and have a Board be used by multiple User entities? I understand the practice of using a many-to-many table which stores the BoardId's together with the UserId's, but what would happen if I were to remove a user that's connected to a board. There's no logical connection between the User that's in the user database and the userId that's stored by the board. (A user can be signed to multiple boards and vice-versa)
My questions in short:
How does this look in the database?
How does the Boards service access the User service and save Users to Boards?
What happens when I delete a User on the User microservice?