3 ms·
What if you know a few fields, like some "id" or "name" at the top level, but the rest of the JSON is highly nested, tree-like? Instead of mapping it onto rela
by nine_k 5y ago
What if you know a few fields, like some "id" or "name" at the top level, but the rest of the JSON is highly nested, tree-like?
Instead of mapping it onto relational tables and keeping indexes, and then running a complex query, you can just put them all into a ready-made, well, blob.
Note that it only makes sense to have a relational column if you need to (1) use it as a query condition or (2) update it independently of others. In many tables, many columns are neither, and can be safely stored as JSON.
- alphalima 5y agoExactly the point I was going to make. It's also relatively trivial to generate view statents from the schema of the object if required for analytics (not fast though). Much better than a crazy ORM rat nest in my experience.