Designing Intranet Messaging system

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
theBond
Forum Newbie
Posts: 19
Joined: Thu Jul 17, 2008 7:46 pm

Designing Intranet Messaging system

Post by theBond »

Hi,

I have to design an intranet messaging system. This is the design i have now.

pvt_msgs
private_message_id
pvt_msg_from_id
pvt_msg_to_id
private_message_subject
private_message
pvt_msg_date

Currently i am not able to messages if a person replies to the message (As it gets updated and the first message will be overwritten by the replied message). Should i have to make a seperate table for messages?


Thanks
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Designing Intranet Messaging system

Post by onion2k »

You don't need a separate table for anything, you just need to store every message rather than updating an old message when someone replies. Storing the id of the message that the new message is replying to might be useful too, then you can build entire conversations just by following the chain of ids.

However.. that said, that would only be a basic system. If you want to do things like sending the same message to multiple recipients then you will need to start breaking things up into separate tables. It depends on the specification for the complete app.
Post Reply