Jump to content

Database design help on - Simple mail communication


avvllvva

Recommended Posts

Hi all,

 

I'm seeking some suggesion on my dattabase design for a simple mail communication system.

In my website i'm gonna implement it, message communication among site members.

 

The basic work flow is:

Suppose there are two users user1 & user2.

If user1 sent a message to user2, that will appear on user2's inbox and vice versa. So that they can communicate each other by different messages.

And each message has an option to reply, so they can sent replies to that parent message. (like gmail,yahoo etc).

 

here is my db structure so far

 

tbl_messages

-id

-message

-datetime

-delete_status_on_inbox

-delete_status_on_sentitem

-read_status

 

tbl_user

-id

-status

 

tbl_map_message_user

-message_id

-sent_id

-receiver_id

 

After this i'm confused about where to keep and track replies within each messages (whether in same table [tbl_messages] OR in a new table)... please suggest. I'm looking same features of gmail, eg; on posting new reply, that message become highlighted and reply goes under it.

 

can I use a table like this (maybe not)

tbl_replies

-id

-message_id

-reply_message

-datetime

 

If u need any clarification on table fields, please let me know.

 

Please share your experience on this. Thanks in advance.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.