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
If you're doing document-orientated work, I suggest taking a look at CouchDB. It is schema-less, meaning issues like this disappear.
Let's take a look at the example: A sends a message to B, and it's deleted by B.
You would have a single instance of the document, with recipients
listed as an attribute of the email. As users delete messages, you either remove them from the recipients list or add them to a list of deleted_by
or whatever you choose.
It's a much different approach to data than what you're used to, but may be highly beneficial to take some time to consider.