In my messaging application, The features I want to provide are:
- Sending a message to multiple people
- Receiving message sent to a user
- Showing message in groups divided by the users, Like in facebook message
- But when a user will send a message to multiple people, It will not be a group message but those messages will go in groups divided by users
My database schema is like this
This schema is able to provide all the functions above but getting the message out from this kind of schema in groups of users is very complex. Can anyone suggest me some better schema??
The unnamed table is of receivers mapping, forgot to write the name in jpg. :(