[xquery-talk] the stupidity of using SQL as a query language for JSON

Michael Kay mike at saxonica.com
Mon Jun 1 12:29:59 PDT 2015


> On 1 Jun 2015, at 19:40, daniela florescu <dflorescu at me.com> wrote:
> 
> 
>> On Jun 1, 2015, at 10:51 AM, Michael Kay <mike at saxonica.com> wrote:
>> 
>>> 
>>> Using SQL to process JSON is simply NOT POSSIBLE.
>>> 
>> 
>> Proof?
>> 
>> 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.
> 
> Michael,
> 
> 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.

You didn’t say “DIRECTLY”. You said it was “NOT POSSIBLE”. 
> 
> 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  ?

Of course not. You’ve got one of the best brains in the business. But that never stopped me debating with anyone.
> 
> 
> And BTW Michael, if SQL  would be good for querying hierarchical data, why in the world did we waste 16 years building XQuery !???

It didn’t say it was good for the purpose. I said it was possible. The only reason I can think of for actually doing it is that there’s a fair bit of software out there that likes to access its data using SQL.
> 
> 
> Just curious
> Dana
> 
> 

Michael Kay
Saxonica


More information about the talk mailing list