Is this database design correct

database-design

I'm trying to represent this:

  • A message can be sent to one or more recipients.
  • A user (recipient) can receive zero or more messages (but he/she could receive a
    message only once).

Is my database design correct?

enter image description here

Best Answer

enter image description here

In nutshell that what you are looking for. You do need composite primary key "binding" those 2 FK in intersection table. (all attributes are omitted for brevity)

USERS can receive zero - or - more messages Messages can be sent to one - or - more users.

ps.

Tool i used to generate image is a bit buggy - line bewteen mail_box and Users should be dotted.