3 ms·
> The limited type system and loose data validation always prevented me of using SQLite. This. "limited type system" is actually an exaggeration in my opinion
by hans_castorp 6y ago
> The limited type system and loose data validation always prevented me of using SQLite.
This.
"limited type system" is actually an exaggeration in my opinion. The "data types" seem to only serve documentation purposes. You can always store any value in any column regardless of the "data type"
- tpetry 6y agoWait? Your can for example put an unicode string into integer or number columns? That can‘t be true? I mean, really? ...
- ludwigschubert 6y agoYeah. Execute program has a short and sweet explanation with in-browser demonstration: https://www.executeprogram.com/courses/sql/lessons/no-type-enforcement-in-sqlite https://www.executeprogram.com/courses/sql/lessons/no-type-e...
- IshKebab 6y agoIt is. They even consider it a feature. You don't actually need to specify column types at all. You can just leave them out. Or make up entirely new types. Foreign key constraints are also not enforced by default but there is at least an option to turn that on.
- hans_castorp 6y ago> Wait? Your can for example put an unicode string into integer or number columns? Yes https://dbfiddle.uk/?rdbms=sqlite_3.27&fiddle=4634e3821676ed28e27c06d7c9c0af46 https://dbfiddle.uk/?rdbms=sqlite_3.27&fiddle=4634e3821676ed...
- IshKebab 6y agoIt is. They even consider it a feature. You don't actually need to specify column types at all. You can just leave them out. Or make up entirely new types like `BLIB` or whatever. Foreign key constraints are also not enforced by default but there is at least an option to turn that on. I'm keeping a close eye on DuckDB which looks like a modern saner version of SQLite.