use 'PRAGMA foreign_keys = ON;' to force sqlite to check constraints