User messaging system design help

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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

Re: User messaging system design help

ryan wrote:
Quoted text here. Click to load it

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

Site Timeline