Database design for email messaging system

后端 未结 9 905
情书的邮戳
情书的邮戳 2021-01-29 22:58

I want to make an email messaging system like gmail have. I would like to have following option: Starred, Trash, Spam, Draft, Read, Unread. Right now I have the below following

9条回答
  •  庸人自扰
    2021-01-29 23:35

    You could create a table for MessageContacts which joins each message to the people who have it in their mailboxes. When a user deletes a message then a row gets deleted from MessageContacts but the original message is preserved.

    You could do that... but I suggest you don't. Unless it's an academic exercise set by your tutor then it is surely a complete waste of time to develop your own messaging system. If it is homework then you ought to say so. If not, then go do something more useful instead.

提交回复
热议问题