844
JSON Query Language (programming.dev)
you are viewing a single comment's thread
view the rest of the comments
[-] SpaceCowboy@lemmy.ca 11 points 3 months ago

Having a lot of joins can be expensive and non-performant.

Only if you don't know how to do indexing properly. Normalized data is more performant (less duplication of data, less memory and bandwidth is being used) if you know how to index.

It may have been true decades ago that denormalized tables were more performant, I don't know. But today it's far more common that the phrase "denormalized tables are more performant" is something that's said by someone that sucks at indexing and/or is just being lazy.

But I do put JSON into tables sometimes when the data is going to be very inconsistent between different items and there's no need to index any of the values in there. Like if different vendors provide different kinds of information about their products, I need to store it somewhere, so just serialize it and put it in there to be read by a program that has abstraction layers to deal with it. It's never going to perform well if I do a query on it, but if all that's needed is to display details on one item at a time, it's fine.

[-] krippix@feddit.org 1 points 3 months ago

I am currently trying to get deeper into database topics, could you maybe point me somewhere I can read up on that topic a bit more?

this post was submitted on 27 Jul 2024
844 points (97.8% liked)

Programmer Humor

19564 readers
840 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS