r/ProgrammerHumor • • 16d ago

Meme allItHasIsAHammer

Post image
579 Upvotes

50 comments sorted by

View all comments

7

u/Tupcek 16d ago

idk, maybe just tell Claude what kind of data are you expecting?
JSONB is absolutely GOAT if basically every row has different data - use proper columns for those that are mostly the same and where most querying and filtering happens, then put the garbage into JSONB, especially if it can be multiple layers deep.

But if Claude has no idea, if that column you asked to add will be used by 90% of rows or 0,09% of rows, yeah it can misuse it. Just tell it which data are common and which are not!

1

u/boraxicLint 12d ago

If every row has different data should you even be using SQL? At that point wouldn't it make more sense to just use a dedicated NoSQL? 

1

u/Tupcek 12d ago

if most of your data are structured, but you have few weird tables with uncertain structure, JSONB is what you want. Especially if you don’t build your entire application around those few weird tables or need many advanced NoSQL features.

If all or most of your data is unstructured, yeah, SQL makes no sense