472,097 Members | 1,072 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,097 software developers and data experts.

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 2337
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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.