Unanswered: Schema Desig for Private Message System
I am developing a website where I have a requirement of "Private Messaging System". Registered user will have an ability to compose messages to any registered users. There is no limit to the number of messages one user can send to another. This looks like a case of "Many To Many" relationship.
My requirement is as follows :
When logged in user in my website clicks on 'Messages Sent', it should list all the messages which logged in user has sent to different members.
When logged in user clicks on 'Inbox', it should list all the messages which other members have sent to the currently logged in user.
It is more like an email system design (where we have concepts like Inbox, compose, sent items etc etc).
Currently the table design which I have is as follows :