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

Programmer Humor

19623 readers
18 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 14 points 4 months ago (2 children)

It’s normal to denormalize data in a relational database. Having a lot of joins can be expensive and non-performant. So it makes sense to use a common structure like JSON for storing the demoralized data. It’s concise, and still human readable and human writable.

Why should I spin up a NoSQL solution when 99% of my data is relational?

[–] [email protected] 20 points 4 months ago

As a data engineer, I focus on moralizing my data, reforming it so it is ready to rejoin society

[–] [email protected] 11 points 4 months ago (1 children)

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.

[–] [email protected] 1 points 4 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?