[xquery-talk] the stupidity of using SQL as a query language for JSON
dflorescu at me.com
Mon Jun 1 11:40:20 PDT 2015
> On Jun 1, 2015, at 10:51 AM, Michael Kay <mike at saxonica.com> wrote:
>> Using SQL to process JSON is simply NOT POSSIBLE.
> My Ph.D. thesis in 1975 showed that you can use SQL to query hierarchic data. With the emphasis on “query”. The problems start with update. So long as you restrict yourself to query, you can map almost any data model onto any other.
you did not read my email properly.
I did NOT say that if you map JSON to relations (one way or another), you cannot use SQL on the result of the mapping.
I said: you cannot apply SQL DIRECTLY on the JSON structures, because it’s semantics is not designed for that.
Com’on Michael. You worked with me for 16 years now. Do I look like I’m so naive and I don’t get things ?
So, please. I understand that EVERYTHING (C++ objects, XML elements, COBOL structures,
assembly processing instructions, anything) can be mapped with enough brute force into relations, and that, without
loss of any information.
So thank you for this notice, but it does not relate to my email.
(BTW, I proved the same thing as you 2O years later…and this was 20 years ago…didn’t know about your PhD sorry….
Apparently this is something that CS has to get it out of their system every 20 years …the time is up again, I guess…...)
The problem is that Drill (like everybody else in that bunch) apply SQL DIRECTLY on JSON structures, in the absence of any intermediary mapping
into relations, which is again, I repeat: A NON-SENSE.
And BTW Michael, if SQL would be good for querying hierarchical data, why in the world did we waste 16 years building XQuery !???
> Though the fact that you can do it doesn’t mean that it’s a good idea, of course. In those days the reason for doing it was that SQL was the only declarative query language in town, and that’s no longer the case.
> Michael Kay
More information about the talk