Comment by zekenie
2 days ago
I’m trying to think through when I’d reach for this over jsonb… I guess the fact that there’s an enforced schema? And that you could do aggregations on your SQLite db? Or maybe if you wanted to send the whole delete db to a client??
> enforced schema
I have bad news for you [0] about SQLite’s view on schema consistency.
[0]: https://www.sqlite.org/quirks.html
I love using the database as the source of truth for data consistency, and constraining your data to only be allowed in your database as long as it's in a valid state.
It's easy enough to replicate those constraints to the client if you want the client to do ahead of time validation, but your source of truth lives in the database...
I wouldn't survive with SQLite.
You can make it behave with its STRICT mode, but that’s fairly recent, and it’s also just upsetting that it has to exist in the first place.
Completely agree that the DB should be the arbiter of validity. Constraints are a good thing.