SQLite differences
Overview
SQLite is an embedded database with storage classes and column affinity. An ordinary INTEGER column may contain nonnumeric text; a STRICT table enforces allowed types after lossless conversion. Verify foreign-key enforcement on each connection.
First example
SELECT v,typeof(v) FROM dc_flexible ORDER BY rowid;Observed SQLite result (rows in JSON):
[ [ 12, "integer" ], [ "abc", "text" ]]How it works
SQLite uses NULL, INTEGER, REAL, TEXT and BLOB storage classes. Date and boolean values are represented using existing classes, not dedicated native date or boolean storage classes. INTEGER PRIMARY KEY normally aliases rowid; WITHOUT ROWID changes this. STRICT is a table option, not a guarantee of identical behavior to another engine. Foreign keys need runtime configuration. SQLite supports RETURNING and UPSERT, but lacks server GRANT/REVOKE and native declarative partitioning. Some permissive grouping or quoting behaviors are portability hazards.
Practical example
SELECT v,typeof(v) FROM dc_strict;Observed SQLite result (rows in JSON):
[ [ 12, "integer" ]]Practice and mistakes
Practice: compare typeof values in the two tables. Hint: the string 12 is converted in both, but abc is stored only in the flexible table. Mistake: assuming declared INTEGER guarantees every stored value is an integer.