title: Adding constraints to list items in SQL Server database
body: <p>I have table holding items for a given list id in my Ms Sql server database (2008R2). 
  I would like to add constraints so that no two list ids have same item list. Below illustrate my schema.</p>
  
  <pre><code>ListID  , ItemID
  1      a
  1      b
  2      a
  3      a
  3      b
  </code></pre>
  
  <p>In above example ListID 3 should fail. I guess you can't put constarint/check within the database itself (Triggers,check) and the logic constaint can only be done from the frontend?</p>
  
  <p>Thanks in advance for any help.</p>