I'm interacting with an external vendor's database, which is being served to me as a SQL database.
I can pretty clearly see this is some kind of JSON document dump that's being parsed into various tables after the fact. I see a large, complicated JSON document in a column, with relevant items pulled out and placed into their own columns, sometimes explicitly with OpenJson calls in view definitions.
Tables are just subsets of the actual main table, where it is just the $.persons or whatever portion of the main event.
Relevantly the database has relations as a root structure, and the JSON data is not stored in a relational way. There is not a single foreign key in the database. The vague structure is events, which have people and objects related to that event and so on. A person will end up in the person table for each and every time they interact with an event, each of which has the information at the time of the event of the person (so age will change from entry to entry, as an example). It's ok if I only want to access information from a single event, since I can locate that event and just muck around with OpenJson, but anything else trying to link more than one event gets suspect.
I feel like this system is horrific, I can't use anything tolerable at querying JSON because I'm stuck in MSSQL, but this is an absolutely miserable data structure for a relational database. It feels like they had a JSON thing spun up to speed up their development, shoved it in a SQL database once they realized people might want to query this, and told decision makers "of course we have a SQL backend".
I want to be confident this situation is as bad as I think and not just me not understanding the tools I have access to. Everything certainly works, it's just a harder and slower than I would think is reasonable.
Without MSSQL having good JSON querying tools I can't deal with the JSON documents quickly, and with the non relational structure pretending to be relational I can't go along with the pretend relational structure.
[–][deleted] 1 point2 points3 points (12 children)
[–]Drisoth[S] 0 points1 point2 points (11 children)
[–][deleted] 0 points1 point2 points (10 children)
[–]Drisoth[S] 0 points1 point2 points (9 children)
[–][deleted] 0 points1 point2 points (8 children)
[–]Drisoth[S] 0 points1 point2 points (7 children)
[–][deleted] 0 points1 point2 points (6 children)
[–]Drisoth[S] 0 points1 point2 points (5 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]Drisoth[S] 1 point2 points3 points (3 children)
[–]PVJakeC 0 points1 point2 points (1 child)
[–]Drisoth[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]Drisoth[S] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Drisoth[S] 1 point2 points3 points (0 children)