4 ms·
Returning and column deletes are a big deal. This will make me return back to SQLite. One other huge issue is that sqllite doesn’t enforce schema. You can say
by nojvek 6y ago
Returning and column deletes are a big deal. This will make me return back to SQLite.
One other huge issue is that sqllite doesn’t enforce schema. You can say that a column is an int but it will happily insert strings. That is a huge minefield.
I want SQLite but with strict enforced scheme that errors when it encounters an incorrect type.
- simonw 6y agoHave you tried using the CHECK constraint mechanism for this? https://www.sqlitetutorial.net/sqlite-check-constraint/ https://www.sqlitetutorial.net/sqlite-check-constraint/
- riyadparvez 6y agoI am curious to know. Is there any reason why they don't support schema enforcement?
- simonw 6y agoI'd love to know that too. The FAQ says at https://sqlite.org/faq.html#q3 https://sqlite.org/faq.html#q3 says "This is a feature, not a bug" https://sqlite.org/datatype3.html https://sqlite.org/datatype3.html says "the dynamic typing in SQLite allows it to do things which are not possible in traditional rigidly typed databases"... but it doesn't expand on that point at all. My best guess is that this is a language culture thing. SQLite has a strong connection to the Tcl community - it started life as a Tcl extension: https://www.sqlite.org/tclsqlite.html https://www.sqlite.org/tclsqlite.html - and Tcl is a very dynamically typed language. Whatever the reasons, it's not going to change now: SQLite has extremely strong backwards-compatibility guarantees, and this is very much baked into how it works. As a dynamic language person this has never bothered me in the slightest, but it's definitely something that comes up a lot from people who are put off using SQLite because of it.