title: sqlite3 in c++ create statements and foreign keys
body: <p>I am trying out sqlite3 create statements and foreign keys in c++ and I came up with 4 requirements.  </p>
  
  <pre><code>1) a employer can create a job position
  2) a employer can view the form reject or shortlist the applicant for interview
  3) a applicant may apply for a job position
  4) a applicant must fill up their details and submit the form if they are keen to apply for a position
  </code></pre>
  
  <p>This is what I wrote</p>
  
  <p>employer Table</p>
  
  <pre><code>/*SQL statement for employer table*/
   char *sql;
   sql = "CREATE TABLE EMPLOYER("  \
       "ID INT PRIMARY KEY     NOT NULL," \
       "NAME           TEXT    NOT NULL," \
       "ROLE           TEXT    NOT NULL );";
  </code></pre>
  
  <p>jobposition table</p>
  
  <pre><code>/*SQL statement for jobposition table */
  char *sql;
  sql = "CREATE TABLE JOBPOSITION("  \
       "ID INT PRIMARY KEY     NOT NULL," \
       "JOBPOSITION    TEXT    NOT NULL," \
       "OUTCOME        TEXT    NOT NULL );";
  </code></pre>
  
  <p>form table</p>
  
  <pre><code>/*SQL statement for form table*/
  char *sql;
  sql = "CREATE TABLE FORM ("  \
        "ID INT PRIMARY KEY     NOT NULL," \
       "FOREIGN KEY (ID) REFERENCES APPLICANT(ID)",
       "FOREIGN KEY (ID) REFERENCES JOBPOSITION(ID)",
        FOREIGN KEY (ID) REFERENCES EMPLOYER(ID)" );";
  </code></pre>
  
  <p>applicant table</p>
  
  <pre><code> /*SQL statement for applicant table*/
   char *sql;
   sql = "CREATE TABLE APPLICANT ("  \
       "ID INT PRIMARY KEY     NOT NULL," \
       "APPLICANT_NAME    TEXT    NOT NULL," \
       "APPLICANT_ADDRESS    TEXT    NOT NULL," );";
  </code></pre>
  
  <p>I am not really sure if this is correct as I just started learning database and need some help with it. </p>