469,600 Members | 2,642 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,600 developers. It's quick & easy.

User messaging system design help

I am designing a website in which users can send messages to one
another. Each user will have a mailbox where they can read their
incoming and outgoing messages and delete them if necessary. Anyone
have suggestions on the optimal way to design the database for such a
system?

Jul 10 '06 #1
1 2287
ryan wrote:
I am designing a website in which users can send messages to one
another. Each user will have a mailbox where they can read their
incoming and outgoing messages and delete them if necessary. Anyone
have suggestions on the optimal way to design the database for such a
system?
table message:
- id int unsigned primary key auto_increment
- sender_id int unsigned
- receiver_id int unsigned
- subject text
- message text
+ other fields you might require

Index to both sender_id and received_id and it should work pretty fast
Jul 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dennis Owens | last post: by
reply views Thread by Dennis Owens | last post: by
reply views Thread by Raymond Gunawan | last post: by
1 post views Thread by John A Grandy | last post: by
reply views Thread by hugo batista | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.