4 ms·
SQLite is great for what it is and its stated purpose, but it's a fundamentally poor database if you actually care about your data. I'm not talking about durab
by VWWHFSfQ 2y ago
SQLite is great for what it is and its stated purpose, but it's a fundamentally poor database if you actually care about your data. I'm not talking about durability. It's perfectly durable, as in it won't lose your data (well, it might). I'm talking about the lack of actual data types and "everything is a string". I'm talking about the general flimsiness. Hipp even said that is a non-goal because it will bloat the embedded object size in your binary. Because that's what it's for....
Insert a string into an int column? Go ahead, it doesn't care. Use a date function on a text value it doesn't recognize as a date? Go ahead, you'll just get a NULL instead of any indication that your value is wrong for what you think it should be.
It's fine for the address book on your phone, or the bookmarks in your browser. But terrible for server things that are important.
- boristsr 2y agoThat's not quite true. There is support for "strict" tables which does have more stringent rules around types https://sqlite.org/stricttables.html https://sqlite.org/stricttables.html
- VWWHFSfQ 2y agoMongo DB also disables safety features by default to improve their benchmarks. But Mongo DB gets lots of criticism for that and SQLite gets none.
- richbell 2y agoI believe foreign key constraint validations are also disables by default.