title: Structuring internal mail system
body: <p>I have two tables in my database:</p>
  
  <ul>
  <li>Company table (ID, CompanyName, CompanyUsername, CompanyPassword)</li>
  <li>Employee table (ID, CompanyID, Name, Username, Password)</li>
  </ul>
  
  <p>Right now I am designing an internal mail system for which employees can write to each other, but also write directly to the company account.</p>
  
  <p>My internal mail table has these fields:</p>
  
  <ul>
  <li>ID</li>
  <li>FromID</li>
  <li>ToID</li>
  <li>Message</li>
  <li>...</li>
  </ul>
  
  <p>Now my problem occurs, when I fill the message table with ID's (From/To) I have no clue if the message is from the company or the employee as the ID might exists in both tables.</p>
  
  <p>What could my solution be?</p>
  
  <p><strong>Update</strong></p>
  
  <p>The example above was to simplify my question.</p>
  
  <p>The employee and company tables does not contain username or password, but an reference to ASP.NET's membership <code>uniqueidentifier</code> for managing logins. As suggested below with using UI's to control the from and the reciever, I go with UI from the ASP.NET Membership controller. Thanks. :-)</p>