Please help on how to form a relationship correctly. I have 2 tables with many fields, one contains users, the other a list of messages. Both are not related by the user Id nor the messages Id, instead these are formed like this: (example only)
User {
Id
...
MessagesId (string by the way)
...
}
Messages{
id
...
MessageGroupId (String)
}
I would like to be able to create a relationship between these 2, that the user can get the list of messages from the other table using the MessagesId and viceversa, that the table Messages could get the user the message belongs to by using its MessageGroupId...
I have tried but received a bunch of errors, maybe because in the list of users, a user could or not have the MessagesId (as not all users send or receive messages)
Any help will be appreciated, thank you in advance!