|
|
|
|
|
by ellisv
188 days ago
|
|
I wish devs would normalize their data rather than shove everything into a JSON(B) column, especially when there is a consistent schema across records. It's much harder to setup proper indexes, enforce constraints, and adds overhead every time you actually want to use the data. |
|
* The data does not map well to database tables, e.g. when it's tree structures (of course that could be represented as many table rows too, but it's complicated and may be slower when you always need to operate on the whole tree anyway)
* your programming language has better types and programming facilities than SQL offers; for example in our Haskell+TypeScript code base, we can conveniently serialise large nested data structures with 100s of types into JSON, without having to think about how to represent those trees as tables.