Jump to content

Database design help on - Simple mail communication


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.