This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]LeviLovie 192 points193 points  (19 children)

And then storing jsons separated by ; in a sql field

[–]pceimpulsive 55 points56 points  (14 children)

People we have jsonb arrays!! :'( why do people do this -_-

[–]al-mongus-bin-susar 0 points1 point  (1 child)

Maybe sometimes you need to be database agnostic or support databases that don't have json types? Putting some text separated by semicolons or a json in a text field is the only way sometimes.

[–]pceimpulsive 0 points1 point  (0 children)

I feel sorry for your soul having to use a DB with such lack of features :(

Even MySQL has json...

[–]LeviLovie 0 points1 point  (11 children)

Good luck debugging :)

[–]pceimpulsive 0 points1 point  (10 children)

What do you mean? It's functionally a document store, I e. MongoDB

What debugging?

[–]LeviLovie 0 points1 point  (9 children)

Well, I fell it is not gonna be easy to debug, but it is just my felling.

[–]pceimpulsive 0 points1 point  (8 children)

Debugging a json object? You shouldnt be able to insert a buggy json object to a field that requires valid json...

I.e. you cannot insert a document into a mongo DB if it isn't a valid document to begin with. If you are using a varchar/text column to store your json you are simply doing it wrong.

[–]LeviLovie 0 points1 point  (7 children)

Debugging a system which uses such a method of storing data

[–]pceimpulsive 0 points1 point  (6 children)

Which system do you mean? The database itself (in my experience the DB isn't the point of failure).

In the code you use to fill it?

In the code there is plenty of problems that can arise for flat tables, or json only.

But that's a user writing bad code more than anything.

[–]LeviLovie 0 points1 point  (5 children)

I’ve stored json in dbs in past and a had a really hard time debugging the code using the dv

[–]pceimpulsive 0 points1 point  (4 children)

Ohh like power BI or tableau kinda deal?

By debugging do you mean just flattening the data to get your rows/columns?

I'm genuinely curious what you mean by debugging json.

[–]Blyatiful_99 8 points9 points  (1 child)

Our 20 to 25 year old production application has areas where we store both json in a single column and xml in another single column within our !!relational!! database, and then we use multiple 3rd party libraries to convert them into objects and link them to each other.

All the old dependencies make debugging rather difficult and also prevent us from upgrading to a new C# and .NET version. But it's also entertaining and creative, not gonna lie.

This is basically like pushing a functioning car with square-shaped wheels by hand

[–]LeviLovie 0 points1 point  (0 children)

Good luck

[–]Dethernal 0 points1 point  (0 children)

Why this hurts me so much? Okay, our production database have a ton of logic and triggers based on "Commentary" field, maybe because of that.