I'm developing a messaging service for an application. It's not an
instant messaging, it's more similar to how e-mail works. I send a
message to user, user receives the message, I have a copy of the
message sent by me in 'sent' folder.
That's what the question is about. User gets the message from me and I
have a copy of that message in 'sent' folder. Where to store both of
them? Do I need different tables within database - one for messages
and another one for sent messages? Or it could be working well with
one table? Do I really need to make a copy of message in order to make
a sent message? Or it could be done without data redundancy, i.e. with
one entry in one table per message?
That's not the question particularly about rails, but I'm not aware
where to ask. Someone should have done something similar. Any advices?
Also, to save you a lot of time. There are some GREAT messaging
plugin's that handle all the basic work and features up on the
agilewebdevelopment site.