I've got a question and I am unsure about the easiest method to set it up.
Essentially, you will find customers. Each user may have a message box, and every box consequently might have several messages.
The issue is, is the fact that you will find some kind of special message boxes, including "New," and "Trash." A person is needed to possess both of these boxes.
I'd ideas about what is done. Among my ideas was for every message box to possess a area recording its type (enumeration of "new," "trash," or "other). But that does not pressure these to have individuals boxes, that we would rather.
I possibly could also provide each user have fields particularly relevant for their special boxes (so within the
user table there'd be fields like
trashBox). Obviously, if they are needed, then your
user_messageBox tables could be mutually related, which may cause apparent problems.
Then, I possibly could allow it to be many-to-many in which the message box table does not connect with customers, so there'd be another table for relevant both of these like a many-to-many. But I'm not going a many-to-many relationship, therefore it does not solve anything!
If you would like only one message box per user, then call "new" and "trash" another thing, just like a condition. Have this be considered a area from the message. (You'd also require a area for that user or equivalently the content box in every message too.)
This will get you thinking outdoors from the box (!) and could give you other ideas regarding using that area should you so choose: "Flagged," "important," "junk e-mail," etc.
Why dont u make use of a message_box_type area,.
I believe you need to pressure the customers to possess both message box types using application logic.
Ideally there'd be two tables, a messages table having a foreign key id message_box_id that links it to a different table message_box. The content_box table consequently includes a message_box_type area additionally with other fields. The applying logic would make certain that two message_box records of these two types 'new' and 'trash' are produced on user register/creation