problem modeling messages tables
-
hello, in my application I have three tables: user, admin, operator each of these three can send a message to another the message can be a response to a message sent by the other or it may correspond to a command (because the user places orders to the admin and the admin can send a message on this order (Order approved, rejected, in process)) all of that concern an application of managment printing my problem is to determinate how much I need to message tables (because there is a lot of messages (corresponding to order, response, simple message, which is sender and receiver....)) here is the image of my model http://postimage.org/image/fezebtifp/ Can you help me or give me examples of similar cases thank you very much
-
hello, in my application I have three tables: user, admin, operator each of these three can send a message to another the message can be a response to a message sent by the other or it may correspond to a command (because the user places orders to the admin and the admin can send a message on this order (Order approved, rejected, in process)) all of that concern an application of managment printing my problem is to determinate how much I need to message tables (because there is a lot of messages (corresponding to order, response, simple message, which is sender and receiver....)) here is the image of my model http://postimage.org/image/fezebtifp/ Can you help me or give me examples of similar cases thank you very much
I wrote a simple messaging application a few years ago and used something like the following: Message table: MessageID -- the ID of message ParentID -- the ID of the immediate parent message ThreadID -- the ID of the first message in the thread SenderID -- the ID of the sender TimeSent -- timestamp Content... (whatever other columns you require) Recipient table: MessageID -- the ID of the message RecipientID -- the ID of the recipient Read/Unread indicator This allowed for multiple recipients for each message. I used GUIDs for IDs, but you could use INTs if you like.
-
I wrote a simple messaging application a few years ago and used something like the following: Message table: MessageID -- the ID of message ParentID -- the ID of the immediate parent message ThreadID -- the ID of the first message in the thread SenderID -- the ID of the sender TimeSent -- timestamp Content... (whatever other columns you require) Recipient table: MessageID -- the ID of the message RecipientID -- the ID of the recipient Read/Unread indicator This allowed for multiple recipients for each message. I used GUIDs for IDs, but you could use INTs if you like.
-
ahmadiss wrote:
I think you forget the receiver_id
That's the recipient.
ahmadiss wrote:
what is the utility of thread_id
Helps find all messages in a thread quickly.
-
ahmadiss wrote:
I think you forget the receiver_id
That's the recipient.
ahmadiss wrote:
what is the utility of thread_id
Helps find all messages in a thread quickly.