title: constraint to limit number of linked fields
body: <p>I have this question that i havent found a nice way to do it.</p>
  
  <p>'Insert mechanisms that enforce these rules(through checks, triggers, assertionts, etc)</p>
  
  <ol start="3">
  <li>A book cannot be linked to more than 3 fields(subjects)'</li>
  </ol>
  
  <p>we have a book table which holds info about the book (ISBN(PK), tittle, publisher etc)
  And we have another table for fields, this one holds info on the fields that are linked to be book by using ISBN as a foreign key. </p>
  
  <p>What i had an idea about was making it so that we count how many times the books ISBN appears on the list, if its more than 3, it wont allow us to add a 4th. but im not sure how that is exactly done, or if theres a better way.</p>
  
  <p>Thanks!</p>