r/programming • • Jul 12 '26 • Bravo 1

Prefer STRICT tables in SQLite

https://evanhahn.com/prefer-strict-tables-in-sqlite/
358 Upvotes

108 comments sorted by

View all comments

Show parent comment

30

u/inkjod Jul 12 '26

Forcing type checks on data insertion is totally not viable.

...says who?

Data cleanup will eventually become necessary; best to do it early on.

If you don't want to, keep those JSON/CSV/XML/whatever as they are, or store them as BLOBs or TEXT. (So, yeah, ultimately we agree.)

BTW, if you're using XML for untyped data as claimed, you're holding it very wrong.

-26

u/taw Jul 12 '26

You don't get to choose what data exists in the real world.

Anyway, every database system supports this in some way.

1

u/inkjod Jul 13 '26

I see your point. I'm sorry about the ridiculous downvotes; they are not from me.