title: Adding values to database but foreign key constraint failed
body: <p>I'm new to sqlite3 and I'm not so knowledgeable about foreign keys. I was trying to insert a data to User:</p>
  
  <p>insert into <code>User</code>(<code>User_id</code>, <code>name</code>) values(201503426, 'John Doe');</p>
  
  <p>But after I run it, I got <code>foreign key constraint failed</code> message.</p>
  
  <p>So I have three tables:</p>
  
  <pre><code>CREATE TABLE `User` (
  `User_id`   integer,
  `plate_number`  integer DEFAULT 0,
  `name`  text DEFAULT 'user',
  `spot_number`   integer DEFAULT 0,
  `credit`    integer DEFAULT 0,
  `order_id`  integer DEFAULT 0,
  FOREIGN KEY(`order_id`) REFERENCES `Orderr`(`order_id`),
  FOREIGN KEY(`spot_number`) REFERENCES `Spot`(`spot_id`),
  PRIMARY KEY(`User_id`)
  );
  
  CREATE TABLE `Spot` (
  `spot_id`   integer,
  `user_id`   text DEFAULT 'vacant',
  `order_id`  integer DEFAULT 0,
  `status`    integer DEFAULT 0,
  FOREIGN KEY(`order_id`) REFERENCES `Orderr`(`order_id`),
  FOREIGN KEY(`user_id`) REFERENCES `User`(`User_id`),
  PRIMARY KEY(`spot_id`)
  );
  
  CREATE TABLE `Orderr` (
  `order_id`  integer,
  `user_id`   text DEFAULT 'user',
  `spot_number`   integer DEFAULT 0,
  `amount_due`    integer DEFAULT 0,
  `time_lapse`    integer DEFAULT 0,
  PRIMARY KEY(`order_id`),
  FOREIGN KEY(`user_id`) REFERENCES `User`(`User_id`),
  FOREIGN KEY(`spot_number`) REFERENCES `Spot`(`spot_id`)
  );
  </code></pre>
  
  <p>How can I add the values without getting an error?.</p>