title: How to One to One relation sqlite3 python
body: <p><a href="https://i.stack.imgur.com/NfhHx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NfhHx.png" alt="enter image description here" /></a></p>
  <p>This is the relation I want to create for my quiz app and im using python</p>
  <p>Module:</p>
  <pre><code>c.execute(&quot;&quot;&quot;CREATE TABLE Questions (
                           mod_id INTEGER PRIMARY KEY,
                           mod_name TEXT NOT NULL
               )&quot;&quot;&quot;)
  </code></pre>
  <p>Question:</p>
  <pre><code> c.execute(&quot;&quot;&quot;CREATE TABLE Questions (
                                      quest_id INTEGER PRIMARY KEY,
                                      quest_name TEXT NOT NULL,
                                      mod_id INTEGER NOT NULL,
                                      FOREIGN KEY (mod_id)
                                          REFERENCES Modules (mod_id)
                          )&quot;&quot;&quot;)
  </code></pre>
  <p>Now Since the each feedback correspont to 1 question, how do i sort of create one to one relationship? should I do the same as I did for the question table? would this be handle automatically by sqlite3??
  Appreciate all sort of help Thanks!!!</p>
  <p>EDIT: Does my feedback table need to have a primary key?? I think no because when accesing the feeback table to delete or add data we just pass the question ID as the parameter to look that row up.</p>