title: Adding constraint to two columns
body: <p>I have a database table with columns <code>"User","Role"</code>and<code>"Application"</code>.
  My requirement is that a user can only have one role but he can belong to multiple applications. I will want add this restriction in form of a constraint but i am not able to achieve it.</p>
  
  <p>Setting unique constraint on "user" and "role" will not help. Also setting unique constraint on all 3 columns will also not help.</p>
  
  <p>Can anyone suggest on how to set constraint here.</p>
  
  <p>Edit1:</p>
  
  <p>Following is the expected out:</p>
  
  <pre><code>User   Role   Application
  U1     R1     A1
  U1     R1     A2
  U2     R2     A3
  </code></pre>
  
  <p>and so on... what i want to restrict is that now that U1 has been mapped to R1, U1 should not be mapped to any other Role.</p>