[xquery-talk] the stupidity of using SQL as a query language for JSON
Ihe Onwuka
ihe.onwuka at gmail.com
Mon Jun 1 11:08:37 PDT 2015
Then I have some questions.
So what happens to the closure property.
Should I be allowed to join a JSON array with an object. Why not, or if so
what type of thing will I get back and what will happen when if I try to
query it (I will be allowed to query it won't I).
If I ask to order by a field and there is no schema to tell me it's type
what is SQL going to do.
Talking of ordering how do I get the 5th array item or the 5th object when
SQL only deals in unordered sets.
What would be the result of union of two objects and how can I determine
whether such a union should be allowed at all when there is no schema?
On Mon, Jun 1, 2015 at 1:51 PM, 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.
>
> 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
> Saxonica
>
>
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20150601/b68035ec/attachment.html>
More information about the talk
mailing list