Jsonb in postgres is fine, I’ve been using it for years. Much better than letting mongodb anywhere near the stack.
But then postgres is basically an OS at this point, enough to compete with emacs for meme potential. And I say that as a happy postgres user.
Wait until people learn about the possibility of putting a web server INSIDE of postgres :)
https://betterprogramming.pub/what-happens-if-you-put-http-server-inside-postgres-a1b259c2ce56
My principle dev asked if we could figure out how to invoke Lambda functions from within postgres trigger functions.
I was like, “Probably. But it’s like putting a diving board at the top of the Empire State building… doable, but a bad plan all around.”
Sounds like someone heard about containers through a bad game of telephone!
PostgreSQL can even run WebAssembly (with an extension)
Classically, a lot of RDBMSen are. MySQL held back for the most part, though it’s not necessarily better for it.
Postgres handles NoSQL better than many dedicated NoSQL database management systems. I kept telling another team to at least evaluate it for that purpose - but they knew better and now they are stuck with managing the MongoDB stack because they are the only ones that use it. Postgres is able to do everything they use out of the box. It just doesn’t sound as fancy and hip.
Both Oracle and Postgres have pretty good support for json in SQL.
JSON data within a database is perfectly fine and has completely justified use cases. JSON is just a way to structure data. If it’s bespoke data or something that doesn’t need to be structured in a table, a JSON string can keep all that organized.
We use it for intake questionnaire data. It’s something that needs to be on file for record purposes, but it doesn’t need to be queried aside from simply being loaded with the rest of the record.
Edit: and just to add, even MS SQL/Azure SQL has the ability to both query and even index within a JSON object. Of course Postgres’ JSONB data type is far better suited for that.
While I understand your point, there’s a mistake that I see far too often in the industry. Using Relational DBs where the data model is better suited to other sorts of DBs. For example, JSON documents are better stored in document DBs like mongo. I realize that your use case doesn’t involve querying json - in which it can be simply stored as text. Similar mistakes are made for time series data, key-value data and directory type data.
I’m not particularly angry at such (ab)uses of RDB. But you’ll probably get better results with NoSQL DBs. Even in cases that involve multiple data models, you could combine multiple DB software to achieve the best results. Or even better, there are adaptors for RDBMS that make it behave like different types at the same time. For example, ferretdb makes it behave like mongodb, postgis for geographic db, etc.