Question

I want to build an online webmail script, that only works for the users of the system, so u can call it a privat message system aswell.

But before i start, then im need some info/feedback. The database layout. how will that look like, is there some roles for that.

and is there a database layout out there, so i can get some ideas how to build up the database !?

Was it helpful?

Solution

I would not create both Sent and Received Messages in different tables, just create one table Messages, as you would other wise create duplicate data, no? (Sender and receiver are in the same messaging system).

When you need to collect the messages for a certain receiver, just query on receiverUserId instead of querying on the received messages table.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top