SQLite Forum

Error not given when referencing something that doesn't exist
Login
The fact that FOREIGN KEY definitions are not checked at CREATE TABLE time may be connected with database dumping and reloading.  SQLite allows a definition like this because at the time you CREATE TABLE Pet, TABLE Owner may not yet exist.

Various utilities dump tables in the order they are held in the database file, or in alphabetical order.  Checking the parent tables as you define a child table would require a relation-chasing procedure to figure out which order to dump the tables in.

One might argue that, if the parent table does exist, the definition should be checked anyway.  But this would introduce a 'sometimes works' behaviour, which might fool programmers into thinking it always works.

In terms of the INSERT command referring to a non-existent parent, if I understand your post correctly, 3.34.0 returned no error, but version 3.36.0 returns an error.  This suggests a bug has been fixed.

Hope that helps.