in reply to Re^2: Examples or tutorials for Perl grammars?
in thread Examples or tutorials for Perl grammars?

The world mapped to index cards

Many RDBMS have the JSON data type nowadays so that an all too obnoxious and rigid 'mapping' can be avoided while retrieval speed hardly suffers.

  • Comment on [OT] Re^3: Examples or tutorials for Perl grammars?

Replies are listed 'Best First'.
Re: [OT] Re^3: Examples or tutorials for Perl grammars?
by LanX (Sage) on Jul 09, 2021 at 17:12 UTC
    Excuse my ignorance, but is there a standard for queries searching in JSON like nested structures?

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      The SQL Standard, in the part called SQL/JSON, describes syntax, yes. Some DBMSen have it implemented already (for quite some time). PostgreSQL has the functionality but not yet the required syntax.

      (In fact the implementation of that syntax for PostgreSQL is waiting to be committed, so I suppose it will be in version 15, next year. It works quite well, and I was able to use the ORACLE and DB2 documentation for SQL/JSON when I was trying it out and looking for examples of that standard-compliant syntax)

      PS
      There is a link to a SQL/JSON pdf (zipped) in the Bibliography part of the PostgreSQL docs:

      PostgreSQL Bibliography

      update: fixed typo's!

        Can I express xpath like queries, like find all elements which are descendants of another element but the direct parent is matching a special criterion?

        How would that look like in SQL?

        Edit

        I'm aware that xpath is for XML and not JSON. Just ignore the missing axes...

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

Re: [OT] Re^3: Examples or tutorials for Perl grammars?
by karlgoethebier (Abbot) on Jul 09, 2021 at 11:54 UTC

    Yes sure. And I added «obnoxious» to my Flashcards. Best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»