title: SQLite check for duplicate rows
body: <p>I have an SQLite database for an art exhibition. In the table "exhibits" I have columns for the artwork ID, the exhibition space ID, a begin date, and an end date. The default value for "end date" is NULL. 
  Of course, the same artwork cannot be displayed in two different spaces at once. So I want to ensure that a new row with an artwork ID is not created unless all existing rows with that same artwork ID have a non-null end date.
  Is there some kind of constraint, trigger, etc. that I can add to the table to ensure this?</p>