title: Database design for internal Messaging (like facebook message)
body: <p>In the following database design, how do I mark an unread message, so we know who read the message either the sender and recipient? </p>
  
  <p>(ie When person X sends a message to person Y, the message will be marked as unread for person Y until person Y reads the message, but its marked as read for person X because he sent the message). </p>
  
  <p><strong>MESSAGE</strong></p>
  
  <ul>
  <li>Id (PK)</li>
  <li>Subject </li>
  <li>Content </li>
  <li>MessageTypeId (FK) - Message, Update (global board-cast), notifications etc</li>
  <li>UserId (FK) - creator</li>
  <li>CreateDate </li>
  <li>ReadDate</li>
  </ul>
  
  <p><strong>MESSAGE_COMMENT</strong></p>
  
  <ul>
  <li>Id (PK)</li>
  <li>MessageId (FK)</li>
  <li>Content</li>
  <li>UserId (FK) - creator</li>
  <li>CreatedDate</li>
  </ul>
  
  <hr>
  
  <p><strong>USER</strong></p>
  
  <ul>
  <li>FirstName</li>
  <li>LastName</li>
  <li>Username</li>
  <li>Password</li>
  <li>IsActive</li>
  <li>etc...etc...</li>
  </ul>
  
  <p><strong>MESSAGE_TYPE</strong></p>
  
  <ul>
  <li>Id</li>
  <li>Code</li>
  <li>Name</li>
  </ul>
  
  <p>EDIT: it seems like the design is incomplete.</p>