title: SQLite composite key (2 foreign keys) Link table
body: <p>I've read the rather cool styled <em>BNF grammar</em> for the SQLite create table statement</p>
  
  <p>found here: <a href="http://www.sqlite.org/lang_createtable.html">http://www.sqlite.org/lang_createtable.html</a></p>
  
  <p>I was wondering how I'd go about creating a link table between these</p>
  
  <p>I have one table, lets say, houses, and another electrical_items.</p>
  
  <p>I want to create a link table to have the house_id and the item_id as a composite key, but I'm not sure how I'd go about doing it, it doesn't appear to allow a primary key to be a foreign key ?</p>
  
  <p>N.B I want a third field pap_tested which stores the date the electrical item in the house was pap_tested so this linking table via composite primary key seems the best approach.</p>