title: Implement/use foreign keys in SQLite?
body: <p>How can I implement a foreign key in SQLite?  I was thinking something like this:</p>
  
  <pre><code>CREATE TABLE job (_id INTEGER PRIMARY KEY AUTOINCREMENT, employer_id INTEGER, ...);
  CREATE TABLE employer(_id INTEGER, employer_name TEXT NOT NULL, ...);
  </code></pre>
  
  <p>Where <code>employer_id</code> is the <code>_id</code> from the table <code>employer</code>. Would this work? Is there another fast, maybe less prone to error way? Maybe with triggers?</p>